JQL query for issues in a status for longer than 30 days

Deleted user May 27, 2021

Can someone help me with a query to pull all stories that have been in a certain status longer than 30 days?

2 answers

1 accepted

13 votes
Answer accepted
Bill Sheboy
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.
May 27, 2021

Hi @[deleted]  -- Welcome to the Atlassian Community!

I believe this will do what you ask.  Please substitute your project and status names.

project = myProject AND status = myStatus AND NOT status CHANGED AFTER -30d

And, please look here for more information about advanced JQL searching:

https://support.atlassian.com/jira-software-cloud/docs/use-advanced-search-with-jira-query-language-jql/


Best regards,

Bill

Deleted user May 27, 2021

Awesome!! That did the trick! I appreciate your help :)Thank you!!

Like Bill Sheboy likes this
Bill Sheboy
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.
May 27, 2021

Jennifer, I am glad to hear that helped you!

And as an FYI, we use quick filters like this to help our teams using company-managed projects (classic) who have a lot of work in progress (WIP).  Checking during the stand-up for things that haven't moved in a while can help start useful discussions.  Such as: NOT CHANGED AFTER -3d

__Bill

Like Arensa Prasta likes this
Paul Stasiak August 4, 2021

Praise you, Bill. This worked finally. Not sure why this is so hard and everything is only made easier by a plug-in. Some of us can't get project funding for plug-ins. This is great.

Like # people like this
Barış Baysal November 3, 2022

Hello All,
This is good , my question is can I perform the same query for issues which have stalled in the same status (for a certain amount of time) at some point in time? so it does not necessarily need to be in "that" status as of now. 
Any suggestions? Thank you

Bill Sheboy
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.
November 3, 2022

Hi @Barış Baysal 

Mostly, in a few ways...You can do is check if the status did not change DURING a window of time:

project = myProjectName AND NOT status CHANGED DURING (date1, date2)

You could also use the AFTER or BEFORE operators, if those would better match your needs.

You may also use the relative date functions, such as startOfYear(), in place of date1 and date2: https://support.atlassian.com/jira-software-cloud/docs/advanced-search-reference-jql-functions/ 

Kind regards,
Bill

Like # people like this
tvishakha May 14, 2023

Thanks @Bill Sheboy it was very helpful

Like Bill Sheboy likes this
0 votes
Vero Rivas
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.
May 27, 2021

Hi @[deleted] 

   Tell us how you want to do the query with what data, even with false information to help you, maybe something like this

    Issuetype = "HU" and status = XXX and createddate >= 30

Cheers

Deleted user May 27, 2021

That doesnt seem to work- I need to pull all stories, bugs, etc. in a project that have been in the "UAT" column for greater than 30 days

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events