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

Lance Wilson January 9, 2020

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
Ansar Rezaei
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 9, 2020

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' ")
Lance Wilson January 13, 2020

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
Ansar Rezaei
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 13, 2020

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") 
Lance Wilson March 5, 2020

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...

0 votes
Tuncay Senturk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 9, 2020

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,

Tuncay

Suggest an answer

Log in or Sign up to answer