Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal


  • Give kudos
  • Received
  • Given


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

[JQL] Finding epics that are related to issues within a different project.

My company’s metrics team is looking for ways to calculate how we are keeping track of our  company’s velocity.  We have epics that are linked to issues within a particular project, we’ll call it ACME.  And they want me to create a rich filter to query for those epics linked to ACME issues and subsequently find all issues linked to those epics. What would be the best way to query for these issues? I’ve tried on my own and feel like my searching falls short, missing some issues.

I use Scriptrunner and the version  of Jira I’m on is 7.13.

2 answers

1 accepted

0 votes
Answer accepted

First, do this search and save it as a filter with a name, for example, "A":

issueFunction in linkedIssuesOf("Project=ACME") and issuetype = epic

 Then do this search:

(issueFunction in linkedIssuesOf("Project=ACME") and issuetype = epic) or issueFunction in issuesInEpics("filter = 'A' ")

See, I would have guessed this would be the way to do it, but it turns out the way people have linked and related these epics is a jumbled mess. Most aren’t in the “issues in epic” list, so I tried to list out from your first comment as my filter. Then tried to used the “linkedissuesOf” command but I’m not sure how I can list all forms of relation in one bracket...

Like Ansar Rezaei likes this

Hi @Lance Wilson 

Could you explain your problem in more details/

As far as I know, your concern is about different link type in projects, and with this query, you list all of them: 

issueFunction in linkedIssuesOf("status = Open") 

Ok, so I should note that my issues are related to finding linked issues in every possible format. I’ve created countless filters that have used

“issueFunction in LinkedIssuesOf(“Project =ACME”, “related to”)”


and a couple more OR statements for  Different issue links.


Is there a Scriptrunner IssueFunction that  shows all issue links? I’m thinking it’s “lssueFunction in LinkedIssuesodAll()”

but looking at the scriptrunner wiki, doesn’t look like it...

Hi @Lance Wilson 

As far as I understand you want to list issues in epics and you already have Script Runner.

Did you have a chance to check issuesInEpics JQL function?

For instance you can type JQLs as below:

issueFunction in issuesInEpics("project = ACME and status = 'To Do'")
issueFunction in issuesInEpics("key in (EPIC-1, EPIC-2)")

I hope I was clear,


Suggest an answer

Log in or Sign up to answer

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you