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?