Can you query of status that changed from Closed to Reopend to In Progress?

Jensen Mathews March 27, 2015

I am trying to figure out all of the JIRAs that were closed, and have been reopened, and then continued to go through the rest of the workflow. Is there a way to use the changed operator to query this?

3 answers

0 votes
Norman Abramovitz
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 27, 2015

The only thing that comes to mind is using the REST API to get the change log and then process through them to find the ones you are looking for. Get the list using the was clauses to get your list candidates. Then retrieve the change log for each identified issue. https://{host}/rest/api/2/issue/{issueid}?expand=changelog.  With the change log you can see the activity and make your decision on the ones you want to record as valid.

0 votes
JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 27, 2015

Do you want something more than:

status WAS "Closed" and status WAS "Reopened" and status not in ("Closed", "Reopened")
Jensen Mathews March 27, 2015

Yes, at my company, sometimes people reopen issues to edit one field and then immediately close them. I only want to see issues changed from closed to reopened and then actually went through the rest of the workflow. The was operator does not exclude the issues that were reopened and then closed again right away.

Norman Abramovitz
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 27, 2015

As I understood the question, Jenson wants to know that the last few states are valid workflow transitions even if the issue is closed. He wants to avoid the issues that are reopened and closed. You need the transition history and then process that list to get what Jenson is looking for.

0 votes
Norman Abramovitz
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 27, 2015

I did something similar but for how long the issue was in each status. I did it through SQL through. I do not believe there is a single JQL statement that can work through multiple previous statuses and maintain their ordering.

Suggest an answer

Log in or Sign up to answer