Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

JQL Nested Query Help

Shadd Schutte December 20, 2022

I am trying to find all issues (Story, Spike, Task, Defect) that are linked to an Epic. here is the hard part we have a structure like this:

 

Enterprise Epic - is parent of Initiatives - is parent of Feature - is parent of Epic - Epic link to Story, Spike, Task, Defect, Bug.

 

What I am trying to find is if I query by an Enterprise Epic I want to see all Initiatives, within those Initiatives I want to see all Features and for all those Features I want to see all Epics and finally for all those Epics I want to see all (Story, Spike, Task, Defect, Bug)

 

The reason I am trying to find this is to create a dashboard that we can then filter by Team Name to see what work from the program level (Enterprise Epic) each team has and how much has been completed.

 

This might help:

  1. Enterprise Epic – Parent of
  2.  Initiative – Child of above and parent of below – ALSO HAS  Child Issues for all Epics linked for Jira Plan
  3. Feature -- Child of above and parent of below
  4. Epic – Child of above and Epic link of below – ALSO Parent Link to #2 Initiative for Jira Plan
  5. Story, Spike, Task, Defect

 

I am trying to find a query that will let me show all level 5 issues related to level 1 Enterprise Epic.

2 answers

1 accepted

3 votes
Answer accepted
Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 20, 2022

In order to create a nested JQL query to get the result you are looking for you would need to get an app that extends JQL, default JQL cannot do that. There are several apps in the Marketplace that can do this, I have used Scriptrunner/Extended search and JQL Tricks in the past to do this.

0 votes
mauricio.groth
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 20, 2022

Hi @Shadd Schutte

I’m Maurício, a support engineer at Digital Toucan and I’m here to help you.

Standard JQL doesn't easily allow it, but you can quickly find the results using our professional indexing service JQL Search Extensions

We have the function ChildrenOfIssuesInQueryRecursive. A given JQL subquery finds issues in the hierarchy below the resulting issues up to an optional depth. It supports Advanced Roadmaps “Parent Link” and a standard Jira hierachy Epic → Story → Subtask.

For example, the query below will find all epics, stories and subtasks in initiatives in project ACME.

issue in childrenOfIssuesInQueryRecursive("project='ACME' and type=Initiative")

Check out the documentation for more examples.

If you have any other questions, please contact our support. We’ll be happy to help you!
Best regards,
Maurício

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Upcoming Jira Events