How to Fix Jira Filter Not Including Subtasks in Results
In this tutorial, you'll learn about How to Fix Jira Filter Not Including Subtasks in Results. We cover key concepts, practical examples, and best practices.
Jira filters default to showing only standard issues (Story, Bug, Task) and excluding subtasks. When you run a JQL search and subtasks are missing, the query needs an explicit condition to include them or filter for subtask-specific fields.
The Problem
You run a JQL query like project = PROJ AND status = "In Progress" and get only parent issues. The subtasks assigned to team members or in the same status are not returned.
Wrong approach — manually counting subtasks by opening each parent issue.
The Fix
Include subtasks explicitly in JQL:
project = PROJ AND issuetype in (Sub-task, Story, Bug, Task)
Or use the issueFunction to get subtasks of specific issues:
issueFunction in subtasksOf("project = PROJ AND status = 'In Progress'")
For subtask-only searches:
issuetype = Sub-task AND assignee = currentUser()
To find subtasks without a parent (orphaned):
issuetype = Sub-task AND parent is EMPTY
For counting subtasks per parent:
project = PROJ AND issuetype = Sub-task
Then use Jira's built-in subtask count column or the "Sub-task" gadget on dashboards.
Expected output:
JQL returns all subtasks matching the criteria
Filter results include both parent and child issues
Subtask counts are accurate in reports
Prevention Tips
- Append
AND issuetype in (Sub-task, Story, Bug, Task)to include subtasks in standard searches - Use the
issueFunctionadd-on (ScriptRunner) for complex subtask queries - Create a saved filter called "All Issues Including Subtasks" for the team
- Use the "Sub-task" gadget on dashboards for subtask-specific reporting
- When creating dashboards, ensure the filter includes the
issuetype = Sub-taskcondition
Common Mistakes with filter subtasks
- Placing the wildcard pattern first in case expressions, making all subsequent patterns unreachable
- Using
headandtailinstead of pattern matching, causing runtime errors on empty lists - Forgetting that lazy evaluation defers computation until the value is forced, causing space leaks with unevaluated thunks
These mistakes appear frequently in real-world JIRA code. DodaTech's contributors have identified these patterns through analysis of open-source projects and production systems.
Practice Exercise
Write a pure function that safely divides two integers using Maybe, then test it with edge cases like division by zero and negative numbers.
This exercise reinforces the concepts covered in this guide. Try implementing it before checking online solutions.
FAQ
Related: DodaTech's JQL Query Optimizer analyzes filter performance, suggests index-friendly conditions, and includes rules for automatically including subtasks in common search patterns. Use with DodaZIP for JQL library management.
Built by the developers of DodaTech
Doda Browser, DodaZIP & Durga Antivirus Pro