JQL for closed tickets that stayed in particular status for x days

I have a jql query that lists me all issues that were closed between a time range in the past((resolved <= and resolved >=).  My jira board has 6 columns and some of the columns have more than one status mapped to it.
Is there a condition in the jql I can specify,  that,  it will list me only those issues that remained in a particular status(say "Testing") for 7 days or above ?

1 answer

This widget could not be displayed.

Hi Sach,

Yes, JQL can track historical events on specific fields.  To so this you can use the CHANGED operator.  You can't use this operator for all fields in Jira.   But you can use this with the status field, so you could create a JQL like this:

status = resolved and not status changed after -7d

In turn this will return all the issues that have a status of resolved and that have not had any changes to their status in the past 7 days. 

I hope this helps.
Andy

Hi Andrew,

Thank you for the suggestion.  That would give me all issues with a status of resolved with no further status change  over the last 7 days.  What I was looking for is to track a status that was prior to it going into a status of resolved - say, I have the following 4 statuses for my issue  - 'Ready to Work','In Progress','Testing','Resolved'  :  I want to see if an issue stayed in 'In Progress' or 'Testing' for 7 or more days prior to it finally getting moved into 'Resolved' status.  Would this be possible ?

To add, if it stayed in either 'In Progress' or 'Testing' status for 7 or more days, can I report that as well via a jql ?

Any hints would be greatly appreciated.

Sorry if I misunderstood your intention here.  That kind of setup would be difficult to do with native Jira alone.  The JQL you would create for this can be setup to look back to a set time period (like -7d, or -5h), or to a specific date (yyyy/mm/dd format), but it isn't particular granular enough to search by the specific duration of a time period just yet.  And since the JQL is using the relative time for when the search is run for these time periods, it makes it more difficult to understand if an issue has really spent a full 7 days in this status before being transitioned.

So I can see that these would not necessarily be helpful to see issues that could have been transitioned at various different times for varying periods of time.

It might help to use a plugin such as Time in Status. This plugin can better help to see within Jira just how long each issue spends in each status.  With that kind of information it would be easier to see which issues meet that specific criteria.

Thank you Andrew for the good info.

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

216 views 3 0
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you