Sub query to pull user stories from Epics and belonging to a different project

We have a project called PHA, it's a master project, that will hold all Epics, Epics are populated with User Stories.

Those User Stories come from PHA or any other projects.

How can I pull all the User Stories from those Epics?  I found the following but it requires to add each Epic manually, I am looking for a way that will pull the Epics directly. Thanks.

project = PHA AND issuetype = Epic OR "Epic Link" in (PHA-1, PHA-2, PHA-3)

 

 

2 answers

2 accepted

1 vote
Mikael Sandberg Community Champion Aug 18, 2017

I don't think you can do it in core JQL, but if you have JQL Tricks (on JIRA Server) you could search for all issues that have epics corresponding to a specific JQL, like this:

issue in issuesWhereEpicIn("project = \"PHA\"")

Thank you @Mikael Sandberg for your input.  I think I just got to a solution, using script runner.

 

This will list all linked issues to the Epics from the Project

issueFunction in linkedIssuesOf("project = PHA", "is epic of")

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Julia Dillon
Posted Tuesday in Jira

Tell us how your team runs on Jira!

Hey Atlassian Community! Today we are launching a bunch of customer stories about the amazing work teams, like Dropbox and Twilio, are doing with Jira. You can check out the stories here. The thi...

553 views 1 18
Join discussion

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