Here’s a comprehensive solution addressing all your KPI concerns:
Resolution Date Behavior on Reopen:
The native Resolution Date field clears when a bug transitions to any “reopened” status category. This is hardcoded Jira behavior and can’t be changed via workflow configuration. To track accurate resolution timestamps across reopen cycles, create a custom DateTime field called “Actual Resolution Timestamp” and set it via post-function on your Resolve transition:
issue.setCustomFieldValue(customField, new Timestamp(System.currentTimeMillis()))
This field persists through reopens, giving you the last resolution time.
Dashboard Gadgets Using System Fields:
The built-in “Average Age” and “Resolution Time” gadgets calculate from Created Date to Resolution Date, ignoring reopen periods. Replace these with custom JQL gadgets or use a marketplace plugin like “Custom Charts” that can query your “Actual Resolution Timestamp” field. For lead time, calculate:
Actual Lead Time = Actual Resolution Timestamp - Created Date
Workflow Post-Functions Affecting Timestamps:
Add these post-functions to your workflow:
- On “Resolve” transition: Set “Actual Resolution Timestamp” to current time
- On “Reopen” transition: Set a “Reopen Count” number field to increment by 1 (use a scripted post-function)
- On “Close” transition: Optionally set a “Closure Timestamp” if you track Resolved vs Closed separately
This ensures your timestamps reflect actual work completion, not system field behavior.
Defect SLAs and KPIs for QA Teams:
For SLA compliance, use Jira Service Management SLA features or a marketplace SLA plugin that can pause timers during specific statuses. Configure SLA goals to exclude “Pending Retest” and “Reopened” states from the active timer. This gives you accurate “time to resolution” metrics that align with QA team performance goals.
For reopen rate KPI, use this approach:
- Unique Defect Reopen Rate: `COUNT(DISTINCT issue WHERE status changed to Reopened) / COUNT(DISTINCT resolved issues)
- Reopen Event Rate: `SUM(Reopen Count field) / COUNT(resolved issues)
Track both metrics-unique defect rate shows quality issues, event rate shows rework volume.
Exporting History for External Reporting:
For monthly executive reports, export via Jira REST API using the changelog endpoint:
GET /rest/api/2/issue/{issueKey}/changelog
Parse the history for status transitions, calculate metrics in your BI tool (Excel, Tableau, Power BI), and join with your custom timestamp fields. This gives you full control over lead time calculations, reopen cycle analysis, and trend reporting without relying on dashboard gadget limitations.
Implementation Summary:
- Add custom fields: “Actual Resolution Timestamp” (DateTime), “Reopen Count” (Number)
- Update workflow post-functions to populate these fields
- Replace built-in gadgets with custom JQL queries or marketplace chart plugins
- Configure SLA rules to pause during non-active states
- Export changelog data monthly for executive reports
This setup ensures your defect KPIs accurately reflect QA team performance and provide reliable data for SLA compliance and management reporting.