Jira issues that are in an epic with certain label

Matthis Thorade June 15, 2022

I am trying to write a Jira JQL filter that combines parentEpic with a label or a filter. The below JQL works:

project=TML AND parentEpic in (TML-2731, TML-3053)

But then I need to know the IDs of the epics, and these only live for few weeks. Labels live much longer, and I can easily search for epics with a label:

project=TML AND issuetype=Epic AND labels in (IndEquip, IndAuto)

But now I would like to use the returned list of epics as input to the parentEpic function, but this does not work:

project=TML AND parentEpic in (labels in (IndEquip, IndAuto))

Are such nested queries in general not possible? Is there any extension that makes it possible?

3 answers

0 votes
Hannes Obweger - JXL for Jira
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
June 15, 2022

Hi @Matthis Thorade

just to add to Mauricio's answer, another option is to go via one of the more hierarchy-focused apps on the Atlassian Marketplace. These apps usually don't rely on "native" JQL to figure out parent/child relationships, but have their own ways of doing so.

As an example, here's how this would work in the app that my team is working on, JXL for Jira:

issues-in-epics-with-label-v2.gif

You can either view and edit your issues directly in JXL, export your issues in various formats, or use JXL to trigger a number of Jira operations. 

Hope this helps,

Best,

Hannes

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.
June 15, 2022

Hi @Matthis Thorade 

As you're on Jira Cloud, the correct answer is to get an app that provides JQL extensions you're looking for.


With standard JQL, you can only get a list of issues and export them to Excel for further processing. This works if you want to do a one-off analysis. If your use case is more dynamic than that, look beyond standard Jira.

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

You can use this query to filter your epic parents that have a label in IndEquip or IndAuto

issue in epicsOfChildrenInQuery("project = TML") and labels in (IndEquip, IndAuto)

 Check out the documentation for more examples.
I hope this helps!
Maurício

0 votes
Matthis Thorade June 15, 2022

Suggest an answer

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

Atlassian Community Events