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 votes

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
Community showcase
Posted Oct 16, 2018 in Jira

Looking for anyone who made the switch to Data Center

The Jira Marketing team is putting together an ebook on migrating to Data Center. We're looking for pro tips on how you staffed your project team and organized your Proof of Concept. Share yo...

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