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

This widget could not be displayed.

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

This widget could not be displayed.

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
    Confirm
     
  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
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

139 views 2 0
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