Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Can I return a list of linked issues and children using JQL and Scriptrunner?

Travis Alexander [Empyra]
Contributor
March 2, 2022

Configuration:

Issues in project ABC are linked to epics in XYZ using a specific link type. The epics in XYZ have issues from various projects inside of them.

 

Ask:

Are there any JQL functions within Scriptrunner that, if given the ABC issue, would return all XYZ epics and the issues inside of them?

 

I hope this makes sense. Perhaps a JQL example would be helpful if you think it's possible. 

 

Facts:

-Data Center

-Have Advanced Roadmaps but using this would require a re-assignment of all the Epics as portfolio children, not just linked. This may be the route they (client) goes if JQL isn't possible.

1 answer

1 vote
Patty Land
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.
March 3, 2022

For querying down multiple levels (you want the linked epic(s) of a specific issue in project ABC, but then you also want the next level down below those epics, I like to create a nested filter query, meaning I create one query, save it as a filter, then reference that filter in my query. There's probably another way to query this as well, but this is what works for me but not all of the issuefunctions work nested:

1. project = XYZ and issue in linkedIssues(ABC-123) - Save this filter

2. project = XYZ and issue in linkedIssues(ABC-123) or issuefunction in issuesInEpics("filter = 'Example'")

If you don't want to query a specific issue in ABC and instead wanted a group of them, like say Capabilities, you can replace issue in linkedIssues(ABC-123) with something like issuefunction in linkedIssuesOf("issuetype = 'Capability'")

Suggest an answer

Log in or Sign up to answer