Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.
×Does anyone know if there is syntax to filter for the next sprint? To help with planning for our next 2-week sprint, I have several filters set up that include the sprint ID for our next sprint but I have to manually update the sprint ID in the filters at each sprint change. I have created all my sprints for the year so the the sprint ID numbers are sequential and I have added start and end dates to each sprint.
I know there is syntax to filter for the sprint that was just closed: sprint in closedSprints() AND resolved >= -14d
Is there anything similar to look two weeks or less in the future?
Community moderators have prevented the ability to post new answers.
Hi @Shirley There are some advanced JQL functions available which you can used to filter the issues from future sprint like below:
sprint in futureSprints()
If you are Scriptrunner plugin then you can use the below JQL as well
Sprint in nextSprint(Board Name)
Further you can check the below Atlassian document for getting more filter results based on board name, project name etc.
https://support.atlassian.com/jira-software-cloud/docs/advanced-search-reference-jql-functions/
For Script runner please check this document.
https://scriptrunner.adaptavist.com/5.0.4/jira/jql-functions.html#_nextsprint
Let me know if you find these JQL functions useful and fulfill your requirement.
Hi @Shirley
Yes, and...to what @Sagar suggests:
Would you clarify your planning steps a bit, as that may provide context for the community to offer ideas to help?
You ask about using JQL to find issues for the next sprint to support sprint planning. Sprint planning is normally when teams identify and select work items to meet the sprint goal they create. Is the team pre-selecting work for the next sprint, prior to planning?
Thanks, and kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you, @Sagar for the quick response. I was hoping to have the query pull the next future sprint only and not all future sprints.
@Bill Sheboy, I'll try to provide more context. Hopefully, it's not too much detail!
I am Scrum Master for a cross-functional modified scrum team doing both operational support and new project work on a 2-week sprint cadence. We are using Jira Cloud with an XRay plugin for testing coverage.
Some of our work needs to happen on specific dates or in a specific order so we pre-assign it to specific upcoming sprints. Other work is flexible so we have a fake sprint which a placeholder for all the work that we would like considered for the next sprint if it will fit in for capacity and priority. We don't have a Product Owner so our team manager reviews and prioritizes the team's work a couple days before sprint planning. Some work is assigned before sprint planning because there are specific people who will need to do it. We use both story points and subtask hours in estimating.
As our work requests have been more than our capacity and priorities are frequently changing, I have created dashboards in Jira to help us better prepare for each sprint planning. One dashboard is focused on backlog grooming and looks at issues just in the next future sprint and our placeholder sprint. There are gadgets on the dashboard (each with their own JQL query) for various issue types that show ones that need more backlog grooming to meet our definition of ready (i.e., they are missing information in key fields).
Example JQL query for a Test Execution issue type, checking four required fields. Sprint ID 44 is our placeholder sprint and Sprint ID 313 is our next future sprint which I manually increment up by one and then resave each sprint:
project = SGO AND issuetype in ("Test Execution") AND resolution = Unresolved AND Sprint in (44, 313) AND ("Team[Dropdown]" is EMPTY OR "Backlog Group" is EMPTY OR Component is EMPTY OR originalEstimate is EMPTY) ORDER BY Rank ASC, cf[10033] ASC, priority DESC
Another dashboard that we use leading up to and during sprint planning helps us know the potential commitment looks like so far and what is being assigned to whom. This helps us to proactively make adjustments to balance the workload.
Example JQL query to see what subtask and Test Execution work is assigned and to whom, and what is unassigned. Again, Sprint ID 313 is our next future sprint which I manually increment up by one and then resave each sprint:
project = SGO AND issuetype in (subTaskIssueTypes(), "Test Execution") AND Sprint = 313 ORDER BY Rank, parent ASC, assignee ASC, created DESC
All that brings me back to my initial question: Is there JQL syntax for a specific future sprint, such as the next sprint ID number or next sprint start date?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for explaining the details, Shirley. There may be an auto-magic approach to help, depending upon a few things:
I ask these questions as it is possible to edit a filter using the REST API (and a web request), from an automation rule. Thus if you can predictably create a sprint which is for development work (not the placeholder), and can determine it is the "next" one by name, you can update the filters used by the dashboards.
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Using an automation rule is interesting idea, Bill. I am using some automation rules for other purposes but have not done anything with a REST API.
I have six upcoming sprint IDs for the remainder of this year and they are in sequential order because I created them all at the same time earlier this year. There will be a break in the number sequence when I create sprints for 2022 but I can manually adjust for that.
The current naming convention is "Sprint ## (beginning and ending months and days)". For example, "Sprint 71 (October 12-25)" or "Sprint 74 (Nov. 23-Dec. 6)".
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for those details, Shirley.
Here is an article describing how to call the Atlassian REST API from an automation rule:
The REST API call you may want gets all of the sprints for a board:
Given your sprint naming convention, you can probably use the text and list functions, with a regular expression, to extract the sprint ID you want.
Once you have identified the sprint ID for the filter change, you may use a different REST API call to alter your filter(s):
https://docs.atlassian.com/software/jira/docs/api/REST/1000.824.0/#api/2/filter-editFilter
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Shirley ,
With standard JQL, you can only get a list of issues that belong to closed, open, or future sprints - regardless of the board they belong to.
You can also export the issues to Excel for further processing. This works if you want to do a one-off analysis.
Standard JQL doesn't easily allow it, but you can find the results quickly using our professional indexing service JQL Search Extensions
After you install the app, you can simply search:
issue in nextSprint("ACME board")
Check out the documentation to see more examples.
I hope this helps!
Daniel
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for sharing your solutions! It helped my team today.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.