Structure is:
Epic -> user stories -> tasks or bugs
How can I list all tasks / bugs that belong to 2 or more epics.
You could either search for all issues that have the epics in question in epic link, but you would have to manually enter the keys for the epics (if you are linking your tasks/bugs to the epic). Another option is to use an app, ScriptRunner and JQL Tricks can be used for nested JQLs.
I have scriptrunner but I have never used it.
Can you give me an example?
Lets say I have epic-123 which has 3 user stories and under each user story are 5 tasks. So I need to get a list of those 15 tasks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
To do it in ScriptRunner you would have to create a filter that gets the stories associated with the epic, something like this:
issuesInEpics("issuekey = epic-123")
Save that filter (in the example the filter is named Stories in Epic), and then use it in another query:
filter = 'Stories in Epic' or issueFunction in linkedIssuesOf("filter = 'Stories in Epic'")
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Olafur,
I do not know how in ScriptRunner but if helpful you can do this using the Power Scripts add-on.
There is a video tutorial walking you through in detail here.
The code is simple:
string [] tasks;
string [] stories;
string [] epics = selectIssues("issueType = 'Epic' AND project = " + argv[0]);
for(string e in epics) {
string [] stry = allLinkedIssues(e, "Epic-Story Link");
for(string s in stry) {
string [] tsk = allLinkedIssues(s, "jira_subtask_link", 1);
tasks += tsk;
}
stories += stry;
}
string [] results;
results = arrayUnion(epics, stories);
results = arrayUnion(results, tasks);
return results;
Hope this helps!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If epic id is for example "MYPROJECT-1234" you can find all subtasks under that epic using JQL filter query on Jira Advanced Search page:
parentEpic = MYPROJECT-1234
if you want to filter only issues that are not epics or stories use:
parentEpic = MYPROJECT-1234 and type NOT IN (story, epic)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This doesn't work on stock Jira, probably you have ScriptRunner or something installed?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Jeroen Vandeweghe parentEpic is one of the JQL functions if you are using Jira Cloud, see Advanced searching functions reference. For Jira Server you need an app like Scriptrunner or JQL Tricks. There is a request to have parentEpic added to Jira Server, see JRASERVER-59181. If you would like to see that function added, I would recommend that you go and vote for it and add yourself as a watcher on the issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.