jql, which returns stories of related epics, which have a certain label

Can you help we with one jql related question. Precisely I have list of epics which I have labeled as important, so I want only these epics and the related items to be shown in the story map. So, how can do it?
I can select all epics based on this label, but I didn't find a way to get all their items with sub-query based on these epics. The only solution I found is "Epic Link" in (list_of_epics), where list_of_epics is comma separated list of all epics I want. Obvious this is not the best solution, because I have to update this list every time...
Will appreciate if you can help me with that.

2 answers

Based on this Answer, I don't think that's possible for Cloud instances.

0 vote
Ignacio Pulgar Community Champion Aug 11, 2016

I think the only available workaround is:

  1. Add the 'important' label to all issues linked with a so labelled epic.

    For doing that, execute your query: "Epic Link" in (list_of_epics)
    Click on the button Tools on the top-right corner > all X issues
    Select all issues > Next
    Edit issues > Next
    Click 'Change Labels' > Add to existing > important > Next
  2. Now, you have all important epics as well as issues which are linked to them with the 'important' label.

    From now on, instead of adding the 'important' label just to the epic, do so to its linked issues all at once in bulk, using a JQL like:

    key in (KEY-27) OR "Epic Link" in (KEY-27)

    where KEY-27 is the issue key of the important epic.

    After executing the query, just bulk edit all the returned issues to add the 'important' label to all of them at once, in a similar way than described on step 1.

  3. Finally, the JQL to get all important epics and all issues linked to them is:

    labels = important

 Hope it helps.

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,308 views 14 20
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot