JQL to get Stories linked to Epics of a specific Initiative

Is it possible to get all Stories tied to Epic given an Initiative.

 

I was able to get this by two separate queries 

query 1: Using Parent Link = "XYZ" i got Epics linked to an initiative

query 2: Using Epic Link = "ABC" i got stories linked to Epic.

 

How to achieve this in a single query.

P.S: We use Script Runner as well

 

Thank You

Chander

1 answer

Well i figured it out how to get this using Script Runner

 

1. Save a filter which pulls all Epics of an Initiative (level higher than Epic) say "ListOfEpics" (the filter id for below filter was 22323)

issueFunction in hasLinks("is Epic of") AND "Parent Link" = PR-448


2. Using above query as a subquery, i could retrieve all stories involved in Epics

issueFunction in issuesInEpics("filter=22323")


Reference article

 

Hope this helps someone using Script Runner till Atlassian deploys a way to report against grand children for Portfolio issue types.

Feel free to correct my query or any thoughts in improving above method is appreciated.

 

Cheers

Chander

Thank you for this! Awesome stuff. Based on your method, we figured out a way to use just one query.

issueFunction in issuesInEpics("'Parent Link' = XXX-##")

where XXX-## is your Initiative issue ID.

Glad that it helped you Christopher Heritage.

Cheers

Chander

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Asked 3 hours ago in Confluence

What are the resources that you use to learn more about Atlassian Products?

I am gathering information about resources available for Atlassian product knowledge transferring for a presentation in our local Atlassian User Group. I want to group them in four categories From ...

34 views 3 3
View question

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