Forums

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

Nest a query for linked issues with a query for issues in an epic - possible?

AB October 28, 2021

Hi,

I have this hirarchy:

1: initiative (with links to epics)

2: epic (with assigned stories)

3: story

I get all linked epics by this query: issue in linkedIssues(abc-123)

Of this result I want to get all stories which are assigned to the epics, like "epic link ="

Can I nest the two queries?

Thanks,

Alexander

2 answers

1 accepted

0 votes
Answer accepted
Trudy Claspill
Community Champion
October 29, 2021

Scriptrunner has a function called issuesInEpics. Try adding your filter to that:

 

issueFunction in issuesInEpics("issue in linkedIssues(abc-123)")

 

AB November 1, 2021

Hi Trudy,

many thanks - this is exactly what I needed!

Alexander

1 vote
Jack Nolddor _Sweet Bananas_
Atlassian Partner
October 30, 2021

Hi ya! How are you doing?
This is Nolddor speaking from SweetBananas marketplace vendor.

 

Sadly you cannot achieve the desired search using standard features on Jira, you must go for a third-party app instead. Using i.e. JQL Booster Pack (if you are on Server / DataCenter) you can type the following:

 

1) Find all Epics linked to given Initiative (i.e. ABC-123)

type = Epic AND issue in linkedIssuesOf('key = ABC-123')

2) Find all Stories linked to above Epics

issue in issuesInEpics(' type = Epic AND issue in linkedIssuesOf("key = ABC-123") ')

3) All together (Initiative, Epics & Stories)

key = ABC-123 OR (type = Epic AND issue in linkedIssuesOf('key = ABC-123')) OR (issue in issuesInEpics(' type = Epic AND issue in linkedIssuesOf("key = ABC-123") '))

(*) Note that this is just an example, you must tune above queries to fit your needs.

 

Using this app you can also query other issues relations, check:

 

Regards

AB November 1, 2021

Thanks for your answer, Jack!

Suggest an answer

Log in or Sign up to answer