ScriptRunner - JQL to grab Epics in a different project linked to stories of my project

Hello Community,

I want to know if there is a way to grab all Epics, no matter what project they may be in, that are linked to stories under a specific project.

For example,

I have project HTP with Stories HTP-1 HTP-2 HTP-3 and Epic HTP-20.

I have project ALM with stories ALM-2 and Epic ALM-22.

HTP-1 and HTP-2 and linked to Epic HTP-20.

ALM-2 and HTP-3 are linked to Epic ALM-22.

I would like to know if there is a JQL that would fetch me HTP-20 (since my story is linked to it) and ALM-22 (since one of my stories is linked it) regardless of what project they may be in. I want to get all Epic's that are associated with the stories under a specific project.

Any information is greatly appreciated!

-Roberto

 

1 answer

1 accepted

This widget could not be displayed.
Peter DeWitt Community Champion Sep 27, 2017

Roberto try this: 

issuefunction in epicsOf('issuetype = story and assignee  = yourname')

This will get you all epics of any stories you are assigned too.

issuefunction in epicsOf('issuetype = story and project = key')

This one will pull all stories in a project and return their Epics.

 

gl - peter

@Peter DeWitt,

Thank you Peter, this is very helpful.

Will issuefunction in epicsOf('issuetype = story and project = key') also pull Epics that are outside of my project but are linked to it via Stories in my project?

I don't want the stories that are assigned to me specifically, I just want all Epics that are linked to Stories in my project.

-Roberto

Peter DeWitt Community Champion Sep 28, 2017

Yes - as long as one of the issues in the internal part of the query has an epic link to it.

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted 12 hours ago in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

39 views 1 0
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