Hi all,
We all know that the Epic-Story relationship is native in Jira and we use "Epic Link" to get the issues under an epic.
Here we have a sorta hierarchy like this:
Activity (custom issue type) - Epic - Story
... where we use a custom "Activity Includes" relationship between Activities and Epics. It's our way of grouping epics together. So we link epics to activities this way.
I have a Confluence report that uses a filter to bring the list of issues under all the epics that are under a given Activity. So I give it an activity id and it gets me all the issues under those epics. In Jira Server, this JQL works perfectly to achieve this:
issueFunction in linkedIssuesOf("issueFunction in linkedIssuesOf('id = prdlh-13295', 'Activity Includes')", "is Epic of") and issuetype = story and status != OPEN
It fails in Jira Cloud, and it fails in ScriptRunner Enhanced Search (SRES) because nested queries are not allowed in SRES. I was told I must create a filter with the inner/nested query first, save that, and then reference it in the outer query, like this:
"InnerQuery" filter: issueFunction in linkedIssuesOf("id = prdlh-13295", "Activity Includes")
"OuterQuery" filter: issueFunction in linkedIssuesOf("filter = 'InnerQuery'", "is Epic of") and issuetype = story and status != OPEN
The inner query returns the list of epics under the activity alright, but the outer query does not return anything, not even an error message. What am I doing wrong?
Hello @Alain BEAULIEU
The InnerQuery is providing you with a list of Epics.
Have you tried running just the first part of OuterQuery to confirm it returns something?
issueFunction in linkedIssuesOf("filter = 'InnerQuery'", "is Epic of")
The first part of the OuterQuery seems to be looking for issues that are linked to the Epic with the link relationship "is Epic of". That doesn't seem to be the way to get Stories that are children of the Epic, if that is what you intend. That seems like it might actually be getting the Activity issues. What are the inner and outer descriptions for the "activity includes" link type?
If you want to get the child issues of the Epics you first retrieved then you would need to do this instead:
issueFunction in issuesInEpics("filter = 'InnerQuery' ")
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Show up and give back by attending an Atlassian Community Event: we’ll donate $10 for every event attendee in March!
Join an Atlassian Community Event!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.