Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Query that excludes closed jiras after x # of days

Karri Adkins December 11, 2019

I am trying to write a query that represents:

  • Project
  • Team
  • excludes an issue type
  • includes all issues except for those closed outside of X days
  • My query is including all issues no matter what I do to it

project in (xx, xxx) AND "Dev Team" = yy AND Sprint in (#, ##, ###) AND issuetype not in subTaskIssueTypes() AND (resolutiondate >= -30d OR status != Done) 

I expected it to leave out of the query all issues closed over 30 days ago, but instead it includes all of them.

 

This posting did not provide the help I need https://community.atlassian.com/t5/Jira-questions/Query-to-show-open-issues-and-issues-closed-in-last-x-days/qaq-p/755434

 

2 answers

0 votes
Payne
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.
December 11, 2019

Are you sure "Done" is the only status a resolved issue can be in? Perhaps you could instead try

... AND (resolutiondate >= -30d OR resolution is empty)

0 votes
Pete Singleton
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.
December 11, 2019 edited

Your query is including all items with "Status != Done", this is due to the brackets you have around the last section of the query... "AND (resolutiondate >= -30d OR status != Done) "

Try this:

project in (xx, xxx) AND "Dev Team" = yy AND Sprint in (#, ##, ###) AND issuetype not in subTaskIssueTypes() AND (resolutiondate >= -30d OR resolution = unresolved)

Suggest an answer

Log in or Sign up to answer