Reputation: 1047
I want to do a Jira issue query, but I dont know if it is possible.
I am looking at how many of our bugs have been re-opened ever. So they were worked on, closed, re-opened, and then fixed and closed again. Its a measure of how well bugs are fixed.
That query uses:
AND status was Reopened
However, we have a behaviour where we close an issue, realise that the issue needs editing, so re-open the issue to change the resolution for example, and then close it again.
I think the best way of doing this is to search for something like
'AND status was Reopened for more than 3 hours'
Is there anything like that? The data is there in the history, it is just a matter of weather we can query it or not.
Upvotes: 2
Views: 1302
Reputation: 208
So, JQL alone does not support querying how long an issue stayed in a particular status. But you can achieve this using Jira Automation
:
Time in Reopened
).Reopened
and
stop the timer when it transitions Out of Reopened
and store the duration.Time in Reopened > 3h
.Upvotes: 1
Reputation: 46
There's no way to write a JQL for issues which were in a status for a given amount of time. JQL only supports searching the time an issue has been in a status relative to a date. If you are using Jira Service Desk, the usual workaround for something like this is to create an SLA for 3 hours which is triggered when the issue moves into the Reopened status, and then query for this SLA being breached.
Otherwise, there are add-ons for adding this functionality to JQL. Or add-ons for creating automations which could set a flag that you could query. Automation for Jira and Scriptrunner are popular plugins that could pull this off, and soon Automation for Jira will be built into Jira Cloud.
Upvotes: 1