How to create a JQL query to select issues in active and future sprints as well as Backlogged Issues

David.Newton June 11, 2021

I need some assistance writing a JQL query that needs to query the issues (i.e. Bugs, Stories) in my project's Active Sprints, Future Sprints and the backlogged items. 

The issue I have encountered is getting the backlogged issues to show up in the query without have issues from closed sprints showing up. 

the query I have right now (below) shows all issues in my project from all sprints that are open or are future sprints, as well as the backlogged issues, however, it does not show any subtasks or issues in those active sprints that have been marked as completed/done. I still need those to show up so I can create a report of sprint issue subtask statuses. 

            "project = GLOB AND issuetype in (subTaskIssueTypes(), Bug, Story) AND resolution = Unresolved ORDER BY status DESC"

Any suggestions for what I need to modify to get the query to just display the issues and their subtasks from the active sprint, the future sprints, and the backlogged issue list?

3 answers

1 accepted

2 votes
Answer accepted
Deepanshu Natani
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 11, 2021

Hi @David.Newton 

The following query should work for you:

Project = GLOB AND sprint in (openSprints (),futureSprints()) OR project= GLOB and issuetype in (subTaskIssueTypes(), Bug, Story) AND sprint is EMPTY AND resolution = Unresolved order by created DESC

Lets try to understand:

JQL to get issues in current and future sprints: Project = GLOB AND sprint in (openSprints (),futureSprints())

JQL to get issues in Backlog: project= GLOB and issuetype in (subTaskIssueTypes(), Bug, Story) AND sprint is EMPTY AND resolution = Unresolved order by created DESC

David.Newton June 14, 2021

This appears to have solved my issue. thank you very much

Like Deepanshu Natani likes this
0 votes
Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 11, 2021

Backlog issue are not in a sprint always, hence we need to account for those without an sprint field value at all in addition to those issues that are in an open sprint right now.  So try something like:

project = GLOB AND issuetype in (subTaskIssueTypes(), Bug, Story) AND resolution = Unresolved AND (Sprint is EMPTY OR Sprint in openSprints()) ORDER BY status DESC

Let me know if that helps.

Andy

0 votes
Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 11, 2021

Try…

project = GLOB AND resolution = Unresolved OR Sprint in openSprints() ORDER BY status DESC

Suggest an answer

Log in or Sign up to answer