Queries issues currently assigned in a sprint

Karim Masarweh January 31, 2024

Hi All

I'm trying to query something that I believe should be very simple: "Find stories CURRENTLY assigned to a sprint" or in other words, ignore the backlog.

I tried using this JQL: "issuetype = Story and sprint is not empty".

However, I noticed that a specific issue ABC-123 is not returned in the results even though it's currently showing like this in the UI "Sprint: None [+1]"

So what I understand is that, even though ABC-123 has currently a none sprint, the fact that it was assigned in the past in a sprint and taken out to backlog, it still comes back in the query...

How can fully ignore the backlog?

Thank you in advance.

 

1 answer

1 accepted

1 vote
Answer accepted
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 31, 2024

Welcome to the Atlassian Community!

The sprint field is not as simple as just "current sprint", it needs to contain all the sprints an issue has been through, so that you can report on old and current sprints (but not the sprints that have not been started)

You need to use the functions to do this.  Try

sprint in openSprints()

There are two others you might find useful in the future - futureSprints() and closedSprints()

 

Karim Masarweh February 1, 2024

Thanks Nic for the answer. 

I'll be trying that. 

It's just so mind boggling how a very basic need is not answered in a simple query. 

I looked also for a way to find that backlog. Apparently there's a need for a complex JQL there as well. Such a complex JQL for such a basic query in Agile processes... 

If you're from Adaptavist, I hope you will come with some functions to make this easier 😉

Thanks again

Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 2, 2024

The thing here is that your board automatically provides that basic need, it's what boards are for.

The best Adpatavist could do is duplicate the function for "sprint in openSprints()"

Karim Masarweh February 2, 2024

Understood. 

Any idea how to find those in the JIRA API? 

Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 2, 2024

Yes, the easiest way is to use the REST API to execute a search for "sprint in openSprints()"

Like Karim Masarweh likes this

Suggest an answer

Log in or Sign up to answer