Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

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. 

 

4 answers

2 votes
Tomislav Tobijas
Community Champion
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
Hannes Obweger - JXL for Jira
Atlassian Partner
January 18, 2025

Hi @Craig Gall

welcome to the community!

If you're open to solutions from the Atlassian Marketplace, you may want to have a look at the app that my team and I are working on: JXL for Jira.

JXL is a full-fledged spreadsheet/table view for your issues that allows viewing, inline-editing, sorting, and filtering by all your issue fields, much like you’d do in e.g. Excel or Google Sheets. It also comes with a number of advanced features, including support for (configurable) issue hierarchies, issue grouping by any issue field(s), sum-ups, or conditional formatting.

With these, you can build a view like e.g. this in just a couple of clicks:

epics-by-sprint-v2.gif

This is really just one of a virtually endless number of possible views and reports; you can also view and group by any other issue fields, configure different sum-up styles, etc. etc.

Any questions just let me know,

Best,

Hannes

0 votes
Dmitry Astapkovich _Colined_
Atlassian Partner
January 15, 2025

Hi @Craig Gall , 

If you are ok to use third party apps, you can try Pivot Report we develop:

SCR-20250115-ui0.pngSCR-20250115-ugc.png


 

You can check this demo report by yourself or schedule a quick call with me to go over the app in details. 

 

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