Get all parent epics for for a set of stories

Craig Gall
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 14, 2025

For a given JQuery that returns a list of stories I want to only list the parent epic that contains them. 

For example i have epics 1 through 10. In each epic i have say 100 stories.

If i query the stories that fall in my current sprint and that returns 50 stories.

I want to only return the parent epic that those 50 stories are related to.

 

I can see plenty of queries that work the other way around e.g. return the stories for a set of epics. 

 

2 answers

1 vote
Tomislav Tobijas _Koios_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 15, 2025

Hmm, I'm not sure if you'll be able to get that with native JQL queries and functions @Craig Gall .

You could take a look at this reply from Trudy. For getting parents, you would usually use parent or parentEpic functions. However, these require specific keys for parents and I'm guessing you don't want that.

Also, as you can't (yet) use nesting in JQL functions - see JRACLOUD-21936: Allow nested JQL function calls , you cannot use queries like 🙁

parentEpic IN (Sprint IN openSprints()) and issuetype = Epic

Hopefully someone has found some workaround for this.

Apart from that, there are enhanced search apps/functionalities from Marketplace such as ScriptRunner Enhanced Search which could probably get you what you need.

Cheers,
Tobi

0 votes
Pasam Venkateshwarrao
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.
January 14, 2025

Hi @Craig Gall 

 

yes you can try using the below query

issue in ( linkedIssues("Epic-XYZ") AND issuetype=story

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events