In JIRA 5.1.3 /GH 126.96.36.199, I would like to find "all stories linked to the epics assigned to me" or as another example "all stories linked to the epics within a component".
In this scenario, we are using the GH provided Epic Link field and not the standard jira linked issues functionality.
I started writing this out as:
project = code AND "Epic Link" in (project = code AND type = epic and assignee=currentuser())
This fails with the following error:
Error in the JQL Query: Expecting ',' or ')' but got '='. (line 1, character 44)
Looking at the Epic Link field, it happily takes the IN operator and am able to manually build a set of epics or use a function like votedIssues() or watchedIssues() but no way to pass another query or filter.
Has anyone solved this in JQL or with add-ons?
Try reading Nicholas Muldoon's post here...http://www.nicholasmuldoon.com/2013/06/using-the-epic-workflow-in-greenhopper/
For a first step, you can get the stories of unresolved epics with:
issueFunction in linkedIssuesOf("issuetype = Epic and resolution is empty", "is epic of")
First you create a filter for your epics as desired --> My Epic Filter
You can then use the issuefunction. Because the filter contains whitespace, you have to quote the name and because it is used within double quotes you have to use single quotes.
issueFunction in linkedIssuesOf("filter = 'My Epic Filter'", "is epic of") OR filter = "My Epic Filter"
With the OR-part you will get the epics as well.
The way i'm doing this for now is to manually build out the set for EPIC LINK to accept:
project = code AND type=story AND "Epic Link" in (CP-123, CP-1234, CP-12345)
Depending on how often we have to do this, I may put together an excel workbook that gets the list of issue ids via the REST ws but I expect that the copy & paste approach will win out for a while.
If you have ScriptRunner 5.6 installed, you can use issuesInEpics like this:
project = code AND issueFunction in issuesInEpics("project = code and assignee=currentuser()")
issuesInEpics is slightly more convenient than the more generic "issueFunction in linkedIssues".
Regrettably, the "out of the box" JIRA doesn't support this functionality. If you want to find all items belonging to Epics pulled back from a query, you will need a plugin.
As the ScriptRunner plugin adds over 35% to the cost of a basic JIRA cloud, we use JQL Search Extensions for JIRA instead - it's about 1/3 the price of ScriptRunner.
They have examples showing how to do the kind of thing you ask here:
In particular, see the "issuesFromEpicsInQuery" documentation.
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events