JIRA JQL: Issues resolved in the current sprint
Asked Answered
O

5

9

I would like to be able to filter for issues that are have been resolved in the current sprint. Generally this would be used to prevent issues resolved in a previous sprint but delayed in testing (not reopened) showing up when we are discussing what developers achieved this sprint.

Closed issues should also appear, but they are not a problem, as if they were closed last sprint, they wouldn't roll over into this one anyway.

In mock-JQL, it would go something like this:

project = "Project name" AND status in (resolved, closed) AND statusChanged() > startOfWeek() 

I have seen startofweek() and friends, but not something like startofsprint().

We have JIRA OnDemand, so we can't install local Java add-ons.

Any way to get this information?

Oppression answered 8/9, 2014 at 11:5 Comment(1)
Not exactly as the OP asked, but worked in the situation I needed that led me here. #7240032Orva
S
7

One way to create queries on issues that are resolved in latest sprint, is to create a filter for them. Then you could reuse that filter in different JQLs that all need to work on subsets of that master filter. Warning This way is little labor intensive -- nevertheless it beats other alternatives, in case you are working with multiple filters.

  1. Create and save filter for "Closed in latest sprint" issues

    status changed to (Resolved, Closed) after 2014-09-15
    
  2. In other JQL-s reuse that filter

    // First JQL reusing filter
    project = "My Project" and status in (Resolved, Closed) and filter = "Closed in latest sprint"
    // another JQL reusing filter
    project = "Other Project" and assignee = currentUser() and filter = "Closed in latest sprint"
    
  3. whenever you start new sprint, remember to update date in "Closed in latest sprint" filter

Indeed, as said previously, this is somewhat manual and time consuming way. But if you are in OnDemand and therefore cannot add your own JQL function that would return start date of latest sprint in defined rapidboard, then you are pretty much out of luck.

Stratfordonavon answered 17/10, 2014 at 12:5 Comment(0)
S
6

You could use the openSprint()-function.

So your query would be :

sprint in openSprints()
Scribble answered 8/9, 2014 at 12:2 Comment(1)
That also would show issues resolved in the last sprint, but which rolled over into the current one due to a testing backlog. This is something we want to filter out.Oppression
S
6

If you want to see issues, that are in current ongoing sprint, but haven't been in previous sprints, then you may query them like that

    project = "Project Name" 
    AND sprint in openSprints("Project Name") 
    AND sprint not in closedSprints("Project Name")

Note I passed argument to closedSprints and openSprints method, this is to make your JQL run faster in larger JIRA instances. You may imagine closedSprints to resolve to a list of sprints from your entire JIRA. In case you have several projects, then sprints would be gathered from hundreds of projects and thus resulting a really long list of sprints (that are mostly irrelevant). However, once you put an argument in that method, you get nice small list of sprints, and matching issues against that is faster.

Additionally you might want to look for issues that have no sprint set

    sprint IS EMPTY

But that would be just for catch the ones who work on issues, that are not in any sprint.

Stratfordonavon answered 7/10, 2014 at 11:4 Comment(1)
I do want to see issues in past sprints - but only if they were "Resolved" or "Closed" in this sprint.Oppression
M
1

Sprint in (openSprints()) AND (resolutiondate > startOfWeek())

Maureen answered 5/9, 2016 at 19:15 Comment(1)
Wouldn't this only work if the sprint starts on a Monday and is one week long?Oppression
O
0

The current, rather unsatisfactory, solution is

project = "Project Name" and status changed to (Resolved, Closed) after [YYYY-MM-DD]

where the date needs to be change manually to represent the start of the current sprint.

Oppression answered 16/10, 2014 at 13:54 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.