JQL for epics, parents and child work items
Short answer
Use the parent field. It works for an epic's child work items and for a work item's sub-tasks:
parent = KAN-1
Replace KAN-1 with the key of your epic or parent work item. parent in (KAN-1, KAN-2) takes several keys.
Queries you can paste
| You want | JQL |
|---|---|
| Open children of one epic or parent | parent = KAN-1 AND statusCategory != Done |
| Unassigned children of one parent | parent = KAN-1 AND assignee is EMPTY |
| Children grouped by status | parent = KAN-1 ORDER BY status ASC |
| Open epics | issuetype = Epic AND statusCategory != Done |
| Open work that is not in any epic | issuetype in standardIssueTypes() AND parent is EMPTY AND statusCategory != Done |
| All open sub-tasks | issuetype in subTaskIssueTypes() AND statusCategory != Done |
| Open child work, grouped by parent | parent is not EMPTY AND statusCategory != Done ORDER BY parent ASC |
Older queries that use "Epic Link" = KAN-1 or parentEpic = KAN-1 still parse on Jira Cloud, but parent is the field Atlassian now uses for both epics and sub-tasks.
What fails, and the exact error
- childIssuesOf.
issue in childIssuesOf("KAN-1")fails with "Unable to find JQL function 'childIssuesOf(KAN-1)'." That function comes from a scripting app, not Jira. - portfolioChildIssuesOf.
issue in portfolioChildIssuesOf("KAN-1")fails on Standard sites with "This JQL function is only available to Jira Premium users." - hasSubtasks.
hasSubtasks = truefails with "'true' is a reserved JQL word." There is no native field for whether a work item has children. - The parent's fields.
parent.status = Donefails with "Field 'parent.status' does not exist or you do not have permission to view it." JQL cannot look at the parent's status or assignee. - A query inside parent.
parent in (issuetype = Epic)fails with "Expecting ',' or ')' but got '='."parentonly takes work item keys.
Searching by child counts and parent status
Questions like "epics that are done but still have open children", "parents with no children" or "epics less than half complete" need stored fields, because JQL cannot count children or read the parent. Parent & Child Fields for Jira (ours, in Atlassian Marketplace review) adds read-only fields for this. Each query below parses on a Jira Cloud site with the app installed:
"Open child count" > 0 AND statusCategory = Done
"Child count" = 0 AND issuetype = Epic
"Child progress %" < 50 AND issuetype = Epic AND statusCategory != Done
"Parent status category" = Done AND statusCategory != Done
"Parent assignee" = currentUser()
issuetype = Epic ORDER BY "Child progress %" ASC
Without an app, the fallback is an Automation rule that writes a count into a number field when a child is created, moved or resolved. It uses rule runs and drifts if a run is missed.