How to find empty epics and epics ready to close in Jira
Open epics that hold no work, or whose work is all Done, make a roadmap look bigger and busier than it is. They are easy to miss because nothing breaks: they just stay open.
Step 1: list your open epics
project = KEY AND issuetype = Epic AND statusCategory != Done
Step 2: check each epic
For each epic in the list, look at its child issues:
parent = KEY-23
No result: the epic is empty. Then check whether anything is still open:
parent = KEY-23 AND statusCategory != Done
If the first query returns issues and the second returns none, every child is Done and the epic is ready to close.
A real example
On our 390-issue demo project, step 1 returns 24 open epics. Checking them one by one shows:
- DEMO-26, DEMO-27 and DEMO-28 have no child issues at all.
- DEMO-23, DEMO-24 and DEMO-25 are ready to close: they have 14, 15 and 15 child issues, all of them Done, but the epics are still open.
How to clean up
- Finished epic: move it to Done. Your roadmap and reports then match reality.
- Empty epic: ask whether the work is still planned. If yes, add the first issues; if not, close it.
Prevent it: close epics automatically
Jira Automation can close an epic when its last child issue moves to Done. Atlassian documents this rule:
- Trigger: Issue transitioned, to status Done.
- Branch: Related issues, type Epic (parent).
- Condition: Related issues condition, Stories (or other issues in this Epic), All match specified JQL:
status = Done. - Action: Transition issue to Done.
Use your own workflow's closed status if it is not called Done. The rule only reacts when a child issue changes status, so epics that are already finished, like the three above, stay open until you close them once.
Source: Atlassian Support, automatically close an epic once all its child issues are closed
Why this does not scale
Standard JQL cannot count child issues, so it cannot list empty or finished epics in one query. With 24 epics, that is up to 48 searches by hand. The automation rule only helps from now on, and it does not catch empty epics.
Or let a health check do it
Link Healthcheck lists empty epics and epics ready to close in one scan. A finished epic can be closed in one click, only when all its child issues are already Done, and after you have seen the change.
Disclosure: we build Link Healthcheck. The JQL method above works without any app.