Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

JQL: filter by sprint and get subtask results

Carlos Durán Narbona
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 28, 2025

Hello, I want to do de next JQL to get all ticket in Sprint X. I want to see the task and subtask.

I read about standardWorkTypes() and know that query: type not in standardWorkTypes() is to get the subtasks. BUT, when I filter by sprint, don't show me the subtasks.

project = "example" AND sprint = 'X' AND type not in standardWorkTypes()

 

So, what the correct way to filter by sprint and show task + subtask?

Many thanks for the help.

1 answer

0 votes
Usman
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 28, 2025

Hi @Carlos Durán Narbona 

In Jira Cloud, especially for team-managed (formerly next-gen) projects, subtasks do not appear in JQL search results when filtering by the Sprint field. This is a well-documented limitation and is considered an open issue - https://jira.atlassian.com/browse/JRACLOUD-90898

Subtasks inherit their sprint from the parent issue but are not directly assigned to sprints themselves.

When you run a JQL like project = "example" AND sprint = 'X', only parent issues (e.g., Story, Task, Bug) are returned. Subtasks are excluded, even if their parent is in the sprintThis limitation affects both the Jira UI and the REST API

Workaround and what you can do

To include subtasks, you need to first fetch the parent tasks and then use their keys to find associated subtasks.

First, find all parent tasks in the sprint using the JQL below:

project = "example" AND sprint = 'X' AND type in standardWorkTypes()

You can then export the list of issue keys from the result. Once you have the list of issue keys, you can use either of the JQL queries below:

  • parent in (KEY-1, KEY-2, KEY-3, ...) OR (project = "example" AND sprint = 'X' AND type in standardWorkTypes())
  • issuetype in subTaskIssueTypes() AND parent in (KEY-1, KEY-2, ...)

This query will return both the parent tasks and their subtasks. 

If you feel this process is cumbersome, consider using third-party apps like ScriptRunner or JQL Search Extensions for Jira Cloud, which can simplify these queries. You can also search for other apps here -  https://marketplace.atlassian.com/search?query=jql

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events