Find work items with incomplete subtasks to complete a sprint in Jira
Platform Notice: Cloud Only - This article only applies to Atlassian products on the cloud platform.
Summary
You may need to quickly find any work items that have incomplete subtasks or child work items linked to them. Jira doesn't natively support searching for work items based on conditional field data of their parents or children. However, we can work around this limitation with some creative use of JQL.
This is most helpful to resolve the "incomplete subtasks" error you may see when you try to complete a Jira sprint.
Solution
Find all incomplete subtasks associated with a sprint
This solution can easily be implemented if you're trying to close a sprint, but have completed all of the Story-level work items in that sprint. Use the following JQL query:
sprint = "<your_sprint>" AND issuetype = Sub-task AND Resolution is EMPTY
Find all incomplete subtasks linked to a completed parent
If you're not searching based on a specific sprint, we'll need to run two separate queries. The results from the first will be used in the second.
First, we find all completed non-subtask work items:
Determine the scope of your search
This may be a list of projects, specific statuses that represent complete work, etc.
Search for all "completed" work that matches your requirements
See the following JQL as an example:
Project = "<my_project>" AND issuetype = "Story" AND Status in ("Done", "Resolved", "Canceled")
Export the results of your search
From your export, retrieve the list of work item keys
Format the list of work item keys into a comma-separated list
Now, we'll find all of the incomplete subtasks that are linked to this completed work. See the following JQL:
(issuetype = Sub-task AND status NOT IN ("Done", "Resolved", "Canceled")) AND parent IN (<comma-separated list of work item keys>)
Third-party marketplace apps
Some third-party apps allow for you to search more directly based on linked work item fields. Example apps include:
You may also find other apps which can provide this functionality. Please note that Atlassian cannot guarantee app functionality or provide support for third-party apps.
Other resources
We are tracking interest in expanding JQL to allow for this type of search by default. Please refer to JRACLOUD-67108.
Was this helpful?