JQL: Retrieve Subtasks for Issues in a Specific Epic on Jira Server

I need a JQL query on Jira Server to list an epic’s issues and their subtasks for dashboard tracking. Jira Cloud options don’t work on version 9.12.

I encountered a similar challenge and eventually found a solution by making use of ScriptRunner’s JQL functions, which have been a game changer. The query I used looked like ‘issueFunction in subtasksOf(“"Epic Link"=EPIC-1”) OR “Epic Link”=EPIC-1’. This single query returns both issues in the epic and any subtasks under them. It bypasses some limitations of Jira Server’s native JQL and helps maintain an up-to-date dashboard. If ScriptRunner isn’t an option, consider running two separate queries and combining the results via a dashboard filter or gadget.

hey, i used a workaround by querying the epic’s issues then fetching their subtasks in a scheduled job. it isnt as elegant but bypasses the jql limits. pro tip: sometimes a script that merges results does the trick. good luck dude

In my experience working with Jira Server versions prior to Cloud-like functionality, I found success by first understanding the limitations of native JQL. I initially attempted creating a compound query but ended up sticking with a two-step method that used separate queries for the epic’s parent issues and their corresponding subtasks. Then I integrated the output into a custom dashboard gadget which allowed for a consolidated view. This approach not only provided transparency but also ensured more reliable data tracking for management purposes over time. Experimentation was key, and the resulting method has proven both efficient and practical.

An alternative method that I have found effective involves using Jira’s REST API in conjunction with scheduled automation to consolidate the desired data. In my setup, I first retrieve all issues linked to a given epic, and then a script fetches subtasks for each issue. While this requires extra configuration, it gives a comprehensive view in one consolidated dashboard widget. This approach eliminates the need for multiple JQL queries and manual aggregation. It also provides flexibility for further customizations and automation to better fit specific tracking needs.