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 Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Thursday in Jira

Meet the AUG leaders of Northern Virginia

@Rachel Wright (Jira Genie), @Billy Poggi (AUG NOVA, DC), and @Dana Jansen (Confluence Queen) are just some of the folks that lead one of the world's most active Atlassian User Group (AUG)....

123 views 4 9
Read article

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