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

Florian Bauer
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.
August 8, 2016

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

1 vote
TõnisO
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.
August 8, 2016

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

0 votes
Ignacio Pulgar
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.
August 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
    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