Forums

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

I am writing a JQL to filter tasks that have been worked in more than 1 Sprint. How to achieve this?

Deepika January 10, 2024

I am writing a JQL to filter tasks that have been worked in more than 1 Sprint. I am trying to use the query "sprint in closedSprints()" and "sprint in openSprints()".

However, the filter needs to show up tasks that have also been closed in older sprints but have gone beyond 1 Sprint

Is there any way to achieve this?

1 answer

0 votes
Danny
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.
January 10, 2024

Hey @Deepika ,

Would the below JQL example work for you: 

(sprint in openSprints() and sprint IN closedSprints()

OR

statusCategory = done AND sprint in closedSprints()

)

The first part brings back all issues current in a sprint that has started AND were in a previously closed sprint. 

The second part looks for all closed/done issues that were in a previously closed sprint. 

My assumptions: 

  • I assume by "work" you mean an issue transitioned through it's workflow. Not time logged.
  • I assume by "task" you mean by all issues though you can apply further JQL conditions to the above to get only Tasks. 

Hope this helps,

Danny

Nic Brough -Adaptavist-
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.
January 10, 2024

Sorry, but the "done" part of this will not work properly.  Boards can have different definitions of done, and statusCategory is not what they look it.  The status is what matters, and only status that is mapped to the last column on the board.

Danny
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.
January 17, 2024

Good point @Nic Brough -Adaptavist-

(assuming I understand your statement) 😊

The JQL is being used as a quick filter on a board and then the statuses would need to be very specific rather than use status category. 

Suggest an answer

Log in or Sign up to answer