Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

JQL to exclude tickets with no sprint that have been in a sprint

Jake S
Contributor
March 3, 2024

what is the jira query to exclude tickets that have previously been in a sprint but currently the sprint is set to none? In this instance "Sprint is not empty" does not work as the sprint field say something like "None +2"

1 answer

2 votes
Walter Buggenhout
Community Champion
March 3, 2024

Hi @Jake S,

I am afraid that is not going to work. To search for a situation in the past, you would need to run a history search (something like "sprint was not empty"). Unfortunately, the sprint field does not support history search:

Screenshot 2024-03-04 at 08.12.05.png

Taking another angle here: it would be a better approach to leave historical sprints in the issues instead of removing older sprints. Leaving the information there gives you an overview of the item's history and you could search for them in a different way:

Sprint is not empty and sprint not in (openSprints(), futureSprints())

That would help you find issues that were previously planned but are not included in any current or future sprints.

Hope this helps!

Jake S
Contributor
March 4, 2024

Hi Walter, thanks for your input.  The problem i am having is that when an incident has been in sprint and then been sent to None, when i search for the following, these items are not returned.

Sprint is empty

 

Walter Buggenhout
Community Champion
March 5, 2024

Hi @Jake S,

A lot depends on what you mean by 

incident has been in sprint and then been sent to none

When an issue is added to a sprint, that sprint is filled out in the Sprint field on the issue itself. When you complete a sprint, that information stays on the sprint field, even if the issue is no longer there. 

The None +2 you mentioned is exactly that.

If you take a good look at my response, I did not use Sprint is empty. I used the opposite, just because of this.

The part Sprint is not empty is used to return issues that have been in previous sprints (mind the NOT). The second part of the query, sprint not in (openSprints(), futureSprints()) ensures that you only return issues that are currently not in an active or upcoming sprint.

Assuming that you are not interested in completed issues, you may even add something like AND resolution = Unresolved, to make sure you don't get issues that were completed in previous sprints.

Jake S
Contributor
March 5, 2024

Thanks again Walter!

My high level requirement is that I would like to find everything that was delivered in sprint 2.

Using this query I still get cards returned that were in sprint 2, that were not delivered and returned to the Backlog which set the Sprint field to "None", see the image below

project in (XX) AND Sprint in ("Sprint 2024.02", "Sprint 2024.2") and Sprint is not empty and sprint not in (openSprints(), futureSprints())

 

2024-03-06_10-14-22.png

 

 

Suggest an answer

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

Atlassian Community Events