Filtering issues in next Sprint

Viewed 8099

I have the following filter to find issues in current Sprint:

resolution is EMPTY AND assignee = currentUser() AND Sprint in openSprints() ORDER BY priority DESC, created ASC

It works as expected. However, our team creates separate "sprint" (in futureSprints()) for stretch goals and I'm unable to query them without picking up the rest of the backlog. However, this stretch goal sprint is always the next one in our list. Moreover, if current sprint is called "Sprint 20-2016", the stretch goals will be called "Sprint 20-2016 Stretch Goals". This means that I can retrieve the stretch goals by grabbing the name of the current sprint. For example, the following hardcoded solution works:

resolution is EMPTY AND assignee = currentUser() AND Sprint in futureSprints() AND Sprint = "Sprint 20" ORDER BY priority DESC, created ASC

Problem is that instead of "Sprint 20" being hardcoded I want something like Sprint = [name of first entry from] openSprints() but don't know how to express this in JQL. Alternatively, since stretch goals are always in the next sprint, something like Sprint in [first entry in] openSprints() + 1 would work as well.

3 Answers

Adaptavist Scriptrunner adds a plethora of extra JQL functions.

One of which is nextSprint

nextSprint("Board Name")

I use it to generate statistics for our next planned 3 week sprint as well as feed a dashboard for users that complete their work early and are looking to pull issues from the next sprint into the current. Generally we pull by stack order, but with as much dynamic work as we have a dashboard gives us a bit more flexibility that a scrum board doesn't offer.

Related