Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Common JQL queries for sprints in Jira Cloud

A common feature in Jira are Software boards - Kanban and Scrum boards are widespread in agile development.
While a Kanban board is a more simple approach with Scrum people usually work in sprints.

What is a sprint?

During the period of a sprint a team implements and delivers a discrete and potentially shippable application increment. This could be for example a working milestone version.

For new users a fixed duration of two-weeks for each sprint is common. Two weeks are long enough to get something accomplished, but not too long so that a team is able to get regular feedback.

In Jira Software, sprints are showed on a boards. Issues are to sprints using filters. You also can search for issues in upcoming sprints using JQL.

How to query for issues in different states of a sprint

Today I am going to show you some useful JQL queries which you can use to query for issues. Those are often assigned to either a currently opened sprint, a completed sprint or a future sprint.
Additionally you learn how find issues in a specific project which are at the same time contained in a sprint.

Searching for issues is easy - you can navigate to "Filters" >> "Advanced issue search" from within your Jira instance.

intro.png


While it is the possible to click on "+ More" and to select "Sprint" using the "Switch to JQL" button, which is a perfect option for new users to learn, you also can write your own JQL query.

As soon as you have created a sprint you can search directly by the sprint's name.
Example:
Sprint = "My sprint 6"

perSprintID.png

It will show you all issues that are contained in the sprint listed in the query.
In the example above you can see one issue assigned to a sprint "My sprint 6".

Searching for issues in future sprints

After their creation sprints it takes some time until planning work is done - therefore they are usually not started right away. Rather this happens when the team is ready - so sprints are considered being a future sprint right after their creation.
As soon as first issues were assigned to a future sprint you can query for them:
sprint in futureSprints()

future.png

Of course you can adapt this query. For example you can narrow it down to a project of your interest like this:

Example:
project = DEV and sprint in futureSprints()

This query will show all issues in project "DEV" that are assigned to future sprints.

Searching for issues in open sprints

As soon as a sprint is started you will want to use a different query.
A quite similar JQL query to the previous one will show you issues in open sprints:
sprint in openSprints()

open.png

Hint: depending on the configuration of your Jira instance it is possible that the feature "Parallel Sprints" is enabled. Doing so more than one sprint can be started at the same time.
If this is the case the query will show issues assigned to any sprint that has been started.
It is also worth mentioning that this query does not show issues that are assigned to future sprints (there is a clear distinction between sprints that have been started compared to them which has not been started yet).

Searching for issues in closed sprints

After the defined period has passed it is likely a sprint will be closed. For historical searches and analysis you will likely be interested in a reporting of issues that are assigned to closed sprints.
The query is similar to the ones you are already familiar with. You can query for issues in closed sprints like the following:
sprint in closedSprints()

completed.png

Hint: issues can be part of several sprints - one example are issues that are 'rolling over' to the next sprint because they could not be finished in the previous sprint.
Therefore it can be perfectly possible that you are seeing an issue as a result of both queries "sprint in closedSprints()" and "sprint in openSprints()".

InDetail.png

From the issue view you will recognize that by looking at the "Sprint" field.
In the example above you see an open sprint listed, alongside with one completed sprint.

Searching for issues in a project which have a value for sprint set

You can also see which issues are contained in sprints at all. This is recorded in the issue's respective field called "Sprint".
The query is easy again:
project = "UHD" AND Sprint is not EMPTY

QueryforSprints.png

I hope this showed you how easy queries for sprints work in Jira Cloud.
In case you are interested in using Scrum for your team there is awesome documentation from Atlassian available from "Agile Coach":
https://www.atlassian.com/agile/scrum
Agile Coach is a useful guide for learning more about Agile methodologies, no matter if you have just started your journey or if you an experienced practitioner looking to just verify some detailed information.

 

5 comments

Jack Community Leader Jun 29, 2021

Great article @Daniel Ebers . Thanks for taking the time to share with the Community.

Mykenna Cepek Community Leader Jun 29, 2021

A great overview of ways to use the sprint-oriented JQL functions. Thanks @Daniel Ebers 

Bridget Community Manager Jun 29, 2021

Amazing article!!!! Very well done @Daniel Ebers 

Hey @Daniel Ebers Thanks for sharing this.

Although I tried this similar query  - "project = "UHD" AND Sprint is not EMPTY" but it didn't work for me. I am getting an error - "The operator 'is not' is not supported by the 'sprint' field." Any insights on why this would be happening?

 

Screenshot 2021-07-23 133949.png

Jack Community Leader Jul 23, 2021

That syntax is fine. I have to wonder if you have a custom field called Sprint.

Like Daniel Ebers likes this

Comment

Log in or Sign up to comment
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you