JQL- Filter completed issues in a specific sprint by category

Ambler September 23, 2015

Trying to get some metrics that can be displayed,

Under Agile -> [BoardName] -> Sprint Report I can pick a sprint and there's 3 tables: "Completed", "Not Completed" and "Removed"

My end goal is to get everything from this "Completed" table and produce some metrics from there based on the catagory it's in (Software, Hardware etc...), but I can't seem to find a JQL Query that covers it.

When I view the table in the issue navigator it just calls each individual Key using:

"issueKey in ([Massive list of each individual issue key])"

My own experimenting and google have failed me, so I'm turning to here for help, if any more detail's needed... Let me know!

7 answers

1 accepted

0 votes
Answer accepted
Thiago Zandona
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.
September 23, 2015

Hi Ambler, 

As I could understand you need something similar to this:

sprint = "Your Sprint Name" AND category = "CategoryName" AND status = completed 

Did you try it? Oh, if your JIRA is any version prior to 6.1.3 you must search the sprint by ID number. See page below if that's your case:

https://confluence.atlassian.com/display/JIRAKB/JIRA+Agile%3A+How+to+search+for+a+Sprint+using+JQL

Hope this helps you.

Cheers

Ambler September 24, 2015

Hi Thiago, thanks for the reply. The problem I'm having is that I cannot find a filter that will give me everything in the "Completed issues" column, (see http://puu.sh/kmj2R/1fd0206667.png for an example of the column in the Sprint Report) There's 96 results there (Not all shown), and those are the ones I want to work with, but I can't find a way to filter those out using JQL, they all share some attributes with stuff in the Not Completed/Removed From Sprint categories. It's either something really silly that I'm missing or something wrong with the way we've set it up that's stopping this working, but that page has a way of filtering out the "Completed" ones and I can't work out what it is. Thanks

Ambler September 29, 2015

Turns out this is the correct way to do it normally, however due to the way it'd been set up in my scenario I couldn't. All working with a few changes, thanks!

Florian Bräuer June 16, 2020

What were the changes @Ambler? It would help the community (especially me) to share the learnings ;-)

Ambler June 17, 2020

@Florian Bräuer Sorry, haven't worked at that company (or used Jira) for a few years now and don't have access/cannot remember what I ended up doing here.

(Also seem to have lost the account I posted this with, oops)

8 votes
Deleted user March 8, 2019

The suggested answer doesn't seem to work any more on JIRA cloud, as the sprint field now can contain multiple sprints.

If a given ticket spans multiple sprints, and is marked completed, it will appear in the completed query for multiple sprints. 

I want to find out the tickets completed during a given sprint, not the tickets that were eventually completed at some point in the past and that were atonce assigned to a given sprint, regardless of the sprint they were actually completed duiring (which is what the above now gives).

Francisco Trindade March 20, 2019

Agreed that the multiple sprint situation invalidates the answer.

Victoria Campbell May 2, 2019

I'm also struggling with this, has anyone found a solution?  I'm looking for a "completed in" function since a lot of these tickets now have multiple sprints assigned to them, so status and sprint aren't enough.  

Jeff May 23, 2019

Adding my voice to this thread as well - essentially, I'm looking for a JQL equivalent of the completed issues as seen in the Sprint Report - something that averts the multi-sprint issue in the current Cloud offering.  Effectively, I am looking to do something like this

`... AND status changed to Done in Sprint 10...`, or
`... AND status changed to Done during (date1,date2)...`

etc.  

Like Domingos Vargas likes this
Jeff May 23, 2019

Hey! Writing this above made me think this through a bit more - I found my solution (with some backup reference from Thomas Schlegel (Atlassian Community Admin) by just trying my second approach above (honestly, I didn't think it was "legal" until I tried it! ;-) per the following:

`... AND status changed to Done during ("2019/05/20 10:00","2019/06/03 09:59")`

where the date range was the start/end of my sprint.  Hope this helps someone out there!!

Like # people like this
Deleted user June 13, 2019

@Jeff this is super useful, thanks!

Amy J Luckette June 30, 2020

Thank you @Jeff !

james_holthaus May 3, 2021

Thanks Jeff, I've been doing some really strange things to figure out how to look up transitions during a date range.  This is awesome.

2 votes
Frank Schophuizen September 24, 2015

Try:

resolution is not EMPTY

1 vote
PhillipS November 5, 2019

There is no generic good way to do with this JQL because of the problems mentioned above.  That being said, i'm not sure when this feature was added, but in the sprint report view of your agile board, if you select the sprint you want to inspect, there is a "View in Issue Navigator" button at the top of each section.  

Although the sprint report view may be good enough for your purposes, if you are looking for more information than the default fields it shows (for instance, epic link) then you'll be able to get your own custom view of the filter when pressing this button.

0 votes
Domingos Vargas April 28, 2020

Hello guys!

I solved a similar situation using the following query:

 

project = XYZ AND issuetype in subtaskIssueTypes() AND Sprint in openSprints() AND (Status changed to Resolved after "2020/04/28 10:00" OR Status changed to Cancelled after "2020/04/28 10:00" OR Status in ("To Do", "In Progress")) ORDER BY created ASC, status DESC, assignee ASC, rank

 

Hope this useful for you.

Thanks

 

Domingos Vargas

0 votes
Bruno Carriere March 6, 2020

Late to the party here but one thing you can do is to search for issues in the sprint you are looking for with the status you are looking for but not in the following sprint, for example:

sprint = "Release68" and sprint != "Release69" and status = "DONE" ORDER BY issuetype DESC

My guess is that behind the scenes it gets treated as "in (sprint )" and "not in (sprint)".

This seems to work for me!

Gerri Mills June 14, 2021

Fantastic! Thanks Bruno!

0 votes
Dave Collins November 6, 2015

resolution != empty

Suggest an answer

Log in or Sign up to answer