JQL to find all children of issues with a label

Christina Evans
Contributor
February 13, 2025

I am trying to figure out a query that can pull all issues with labels = XXXX and their associated children. I have a data set of 18 issues, and I want to create a filter to track all of the parent child work related to any issue labeled with XXXX.

I am stumped. AI is not helping.

4 answers

2 votes
Vishal Biyani
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.
February 13, 2025

@chrchr 

JQL does not allow relational query.

Say if your Epic has label XXXX and you query for labels = XXXX, then you will only get the Epic.

Using the Epic key, you will have to write another query to find issues that are child of Epic.

 

Alternatively, you can look at Third party marketplace apps if they fit your requirement

0 votes
Sirine
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 14, 2025

Hi @Christina Evans , 

Unfortunatly , Jira do not support hierachy using labels 

Let’s say you want to find all the issues under one EPIC that are labelled with “frontend”.

Then you will get all issues that have the value “frontend” as a Label.

This does not exclude issues that have other Labels values also.

You can use this JQL query to find them : 

(JQL labels)  : Project = XYZ AND IssueType = EPIC AND Parent in (XZ) AND labels in (“frontend”) AND Labels not in (“labelVaue1”, “labelValue2”, “labelValue100″…) 

 
You can look at Marketplace apps if they fit your requirement as @Vishal Biyani said . 

As an alternative , you can use Colored Label Manager to get deeper label usage insights in moments.

Colored Label Manager .png



Cheers 

0 votes
Hannes Obweger - JXL for Jira
Atlassian Partner
February 14, 2025

Hi @Christina Evans,

Unfortunately, this is trickier than one might think; as a hierarchical query, it would really require some kind of "join" or "subquery", which isn't available in plain Jira/JQL.

A few directions forward:

  • If it's a one-off thing, you could first query the relevant parents, and then use the keys of these parents in a second query, in an "parent in (KEY-1, KEY-2, ...)" clause.

If you want to run your search dynamically, without manually "stitching" two queries together, you'll need extra tooling:

  • You might be able to use Jira Automation to "propagate" epic information down to the epic's children, and then use the respective field(s) on the children to include them into your filter. Obviously, this will add a fair bit of complexity to your system.
  • There's different apps from the Atlassian Marketplace that can help with that. First, there's a number of apps that extend JQL by additional functions, including hierarchy-related functions. I've used JQL Search Extensions a few times and it works well.
  • Alternatively, you could try one of the more hierarchy-focused apps from the Marketplace. These apps typically have their own ways of figuring out parent/child relationships between issues, and provide more powerful ways of searching through issue hierarchies. I myself work on such an app, in which your use case would be easy to solve - I'll provide more details below.

Hope this helps,

Best,

Hannes

Hannes Obweger - JXL for Jira
Atlassian Partner
February 14, 2025

... and to expand on the last point, this is how this would look in the app that my team and I are working on, JXL for Jira. Put simply, you'd create a sheet with all issues that are potentially relevant to you, enable the default issue hierarchy (that's just one click), and then use JXL filtering capabilities to narrow down to the issues that you care about:

epics-for-label.gif

Once you have your list of issues, you can work on these directly in JXL (much like you'd do in e.g. Excel or Google Sheets), trigger various operations in Jira, or export them for further processing.

Any questions just let me know!

0 votes
Dmitry Astapkovich _Colined_
Atlassian Partner
February 14, 2025

@Christina Evans ,

While it's impossible to nest search functions in JQL, you can still use the list of issue keys from your initial search with parent function. Something like:

parent in (XX-YYY, XX-ZZZ, ...)

 
It will look like this in Jira UI:
SCR-20250214-lexp.png


It will work but the obvious issue is that the list of source issues is static regardless of the changes made to that label(s). 



Alternatively, you can find a Marketplace app as @Vishal Biyani  mentioned. E.g. we are developers of Pivot Report, which allows reporting on search results extended with related issues:

SCR-20250214-lguv.png


Additionally, you can define custom hierarchy based on issue links. E.g. "blocks" or "is implemented by":

SCR-20250214-lhhv.png


Demo report is available here, list of all demos is here

Suggest an answer

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

Atlassian Community Events