JQL to Show All Work Items and Subtasks in an Epic
For Jira users looking to manage and track work items and subtasks within an Epic, Jira Query Language (JQL) is an essential tool. It enables the extraction of detailed information about work items and their hierarchical relationships. This article provides a guide on using JQL to display all work items and subtasks associated with an Epic, with practical examples. Additionally, for users seeking enhanced visualization, the "Status & Progress Report" gadget from the "Simple Custom Reports, Charts & Time in Status for Jira" app offers a supplementary solution.
Crafting JQL Queries for Epics
JQL allows for precise querying of work items based on various criteria. To find all work items and subtasks within an Epic, the queries can be formulated as follows:
Example 1: Finding All Work Items in an Epic
To list all work items linked to a specific Epic, you can use the Epic Link field:
"Epic Link"=EPIC-KEY
Replace EPIC-KEY with the actual key of your Epic. This query will return all the work items that are directly linked to the specified Epic.
Example 2: Finding All Subtasks of Work Items in an Epic
To find subtasks of all work items in an Epic, a more complex query is required:
issueFunction in subtasksOf("Epic Link"=EPIC-KEY)
This query utilizes the issueFunction provided by the ScriptRunner plugin, a common Jira add-on, to find subtasks of work items within the specified Epic.
Example 3: Combining Work Items and Subtasks in One Query
To get both work items and their subtasks in a single query, you can combine the above queries using the OR operator:
"Epic Link"=EPIC-KEY OR issueFunction in subtasksOf("Epic Link"=EPIC-KEY)
This query provides a comprehensive list of all work items and subtasks associated with the Epic.
Utilizing the "Status & Progress Report" Gadget for Enhanced Visualization
For those who need to visualize this data within their Jira dashboard, the "Status & Progress Report" gadget from the "Simple Custom Reports, Charts & Time in Status for Jira " app can be a useful addition. This gadget offers a more graphical representation of the work items and their progress, which can be added to your Jira dashboard with a few clicks.
Using JQL to query work items and subtasks in an Epic is a powerful way to extract detailed information within Jira. These queries provide flexibility and precision for users needing to track the progress of work under an Epic. For additional visualization capabilities, the "Status & Progress Report" gadget can complement these queries by offering a more graphical overview of the data. Together, these tools enhance the management and tracking capabilities within Jira, making it easier to oversee and control large and complex spaces.