jirajql

In a filter in Jira, how can I refer to the next or the previous sprint in a project?


I often need to send out reports about the next sprint or the sprint that has just been completed.

I know I can refer to all upcoming sprints in a Jira filter using futureSprints() and to all previous sprints using closedSprints(), but other than specifying the sprint name, I see no way of filtering all issues of the last or the next sprint.
This precludes me from setting up filters that I can subscribe to, since I have to change the sprints in the filters every time a sprint gets completed and a new one gets started.

Is there any way to do this with JQL?

If not, is there any plugin that does this? Is there a feature request for it?


Solution

  • Yes, that's possible. But you have to use third-party tools. Have a look at https://scriptrunner.adaptavist.com/latest/jira/jql-functions.html#_nextsprint and https://scriptrunner.adaptavist.com/latest/jira/jql-functions.html#_previoussprint. And you need this plugin https://marketplace.atlassian.com/plugins/com.onresolve.jira.groovy.groovyrunner/server/overview