JIRA JQL: Issues resolved in the current sprint

血红的双手。 提交于 2019-12-10 13:18:47

问题


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?


回答1:


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.




回答2:


You could use the openSprint()-function.

So your query would be :

sprint in openSprints()



回答3:


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.




回答4:


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




回答5:


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.



来源:https://stackoverflow.com/questions/25722841/jira-jql-issues-resolved-in-the-current-sprint

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!