Using JQL, can I get a list of epics for a large set of stories that point back to one of the epics?

Kamran Ansari August 7, 2018

So here's the situation. I have a JQL query that returns a list of stories.

To keep it simple, let's use the query below as an example:

PROJECT = HakunaMatata AND issuetype in (Story) and Status in (Open) ORDER BY EpicLink

As the next step, I need to derive the list of unique epics that are being pointed to by one or more stories from the query above.

My question: Is there a way to produce the final result (list of unique epics) for the stories that meet the criteria in the above query, using a single JQL statement? If not, then what is the best way to accomplish it using JQL?

If it helps, the stories have a fixVersion on them, but the epics don't (the field is empty).

 

I'd greatly appreciate any help I can get! Thanks in advance!

1 answer

1 accepted

1 vote
Answer accepted
Tuncay Senturk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 7, 2018

Hello,

AFAIK you can't do that in Jira out of the box.

If you have Script runner plugin, you can use below JQL

issueFunction in epicsOf("PROJECT = HakunaMatata AND issuetype in (Story) and Status in (Open)")

Kamran Ansari August 15, 2018

Thank you, Tuncay!

It took me a while to get our JIRA admin to install the 30 day trial of ScriptRunner, and so far, it seems to work just fine. I have more questions about ScriptRunner and how to get it to accomplish some of the more complex queries, but I will post those separately.

 

Thanks again!

Suggest an answer

Log in or Sign up to answer