Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Create a filter for all epics with a given label and retrieve the child tickets for these epics

Harees Hussain February 6, 2024

lets say I have multiple epics all of which have tasks and stories within them (child tickets).

Each epic is assigned a label.

However the child tickets of these epics do not have the same label as the parent (Epic).

I want to filter for all parents (epic) with the label 'product_x' then i want this filter to also include ALL child tickets of the epcis we have found with the above label.

important to note that the child tickets do not have the same label.

3 answers

0 votes
Charlotte Santos -Appfire-
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 6, 2024

Hi @Harees Hussain 

I’m Charlotte, a support engineer at Appfire and I’m here to help you.

Unfortunately, using vanilla JQL, you’ll not be able to do it dynamically.

In the app where my team works, JQL Search Extensions for Jira, you can use this query to get all the parents (epics) with the label ‘product_x’ and their children:

issue in epicsOfChildrenInQuery("") AND labels = product_x OR issue in childrenOfEpicsInQuery("labels = product_x") AND type in (Task, Story) 

Please contact our support if you have any other questions about this query.

We’ll be happy to help you!

0 votes
Bill Sheboy
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 6, 2024

Hi @Harees Hussain -- Welcome to the Atlassian Community!

That type of query is not possible with the out-of-the-box JQL.  Other solution approaches depend upon how often you need to do this and your willingness to purchase marketplace addons:

  • need this often and able to buy addons
    • Investigate the Atlassian Marketplace for addons to extend the features of JQL for such types of queries
  • need this infrequently
    • Search for the epics needed, export the results, copy the resulting issue keys to build a comma-separated values (CSV) list, and then query again to find the children: parent IN ( list of the epic keys ) OR key IN ( list of the epic keys )
    • Another approach, if you expect fewer than 100 issues to be returned, is to create an automation rule to return the issues, as it could dynamically build up the query needed for the results

Kind regards,
Bill

0 votes
Vishal
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 6, 2024

Hi @Harees Hussain 

If you don't have any marketplace app, I dont think you'll be able to get the desired result. However, you can work it out with a dumb way like this, first run a jql to get all your epics with specific labels then once you have the list of all the epics key, you can update the second part of the query in italic & get the result.

The final query would look something like this :

project = ABC AND issuetype = Epic AND labels = 'product_x' OR "Epic Link" in (ABC-18,ABC-43,ABC-21)

Hope it helps.

Suggest an answer

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

Atlassian Community Events