Is there a way using JQL to query for all issues AND their corresponding sub-tasks for any given epic?
I tried using "Epic Link" = PRJ-1134 , but that only shows my stories, not my sub-tasks that are connected to those stories.
Thank you!
Install the free ScriptRunner plugin and then use the following query where XX-### is your issue key:
("Epic Link"=XX-###) OR issueFunction in subtasksOf("\"Epic Link\"=XX-###")
Solution to show all Items in an Epic is this without having to use any plugin:
project = CC AND "Epic Link" = CC-2 OR parent in ("CC-2")
Hope this helps.
Looking for Features and Nos of Stories and Nos of Tasks are under it. Any idea?
@Sudipta Panda,
I see you are new to the Community so I thought I would first let you know that, for future reference, in this case it would be best to start a new thread for your question as this thread is very old and it isn’t clear if your question is precisely the same.
To your question, more info is needed so that the Community can assist. I’m guessing here so please correct me if I’m mistaken. It seems you have an issue type called “Feature” and you want to get a count of the total number of tasks w/in the feature? Or is there some other goal? What do you want to see in the end? A filtered list? A gadget on a dashboard? Is this a one time query or do you want it to be a regular report/gadget?
If you can provide more details I will try to assist further.
issuetype in (subTaskIssueTypes(),standardIssueTypes()) AND parentEpic = ZSP-1
Whoa, that works. Thank you!
linkedIssues() is a built in JQL function.
It searches for issues that are linked to an issue. You can restrict the search to links of a particular type. If the issue is an epic, the search returns all issues and subtasks of that epic. If the issue is not an epic, the search returns all subtasks for the issue.
So if you have an epic link say EXMPL-101, by searching the following in your filter, linkedIssue = EXMPL-101, your filter should should return all of the issues related to that epic and any sub-task of those issues.
@TCarr I'm not able to use the LinkedIssue. The system doesn't recognize it or I don't have permissions. If it's a permission problem, where would I go to enable that?
I don't believe you need any higher permissions to perform this function. Also, it should be available on both Cloud and Server versions of Jira.
There may be a problem with the case of your function. The "L" in LinkedIssue should be lowercase (I had originally typed it wrong in the example above, my mistake). Please refer to this page "https://confluence.atlassian.com/jiracorecloud/advanced-searching-functions-reference-765593719.html" for further function details.
Hope that helps!
Doesn't work for me
I have an
an epic: EPIC-4
an story: TMG-44
and a subtask to my story: TMG-59
I got no result for any of those 3 queries
issue in linkedIssues(EPIC-4)
issue in linkedIssues(TMG-44)
issue in linkedIssues(TMG-59)
I'm using version 7.7 Server
Is there anything I miss?
This works on JIRA 7+ without requiring a plug-in etc:
"Parent Link" in (childIssuesOf(TEMP-84)) OR "Epic Link" = TEMP-84
I tested this in Jira Server 7.9 and got:
Unable to find JQL function 'childIssuesOf(TEMP-84)'
"parentEpic" isn't either a Jira Server option.
I did what Julio Ferndandes suggested:
* Installed the free [AM Utils Plug-in|https://marketplace.atlassian.com/apps/1211565/am-utils?hosting=server&tab=overview]
* Adjusted the filter (Quick filter for the board in my case) to:
{noformat}
issuekey in (issuesSubtasks("'Epic Link' = XXX-11")) OR "Epic Link" = XXX-11
Hope that helps.
This seems pretty simple, but it worked for me:
parentEpic = "Epic-ID"
That captures children of the epic. But not children of the children of the epic. If you have a task with subtasks that's in the epic then you'll get just the task and not also the subtasks. The challenge here is to return all descendants of the epic.
Indeed exists a greater big discrepancy between Server and Cloud. There's no only one solution. And the screenshot posted shows it. @Fernando Valenzuela Jr. is at cloud. I'm at server and this not work. Ok! Let's finish this: users of cloud has a lot of solutions posted here. Users of server might use (free) AM Utils add-on and a function and perhaps someday the Atlassian Team should unify this solution.
I normally use the following query: parentEpic in (DEMO-1) where DEMO-1 is the issue key
Here it is, returning both parent and subtasks from epic:
"Epic Link" in (ABC-4820) or parent in havingSubtaskIssuesFromQuery("('Epic Link' in (ABC-4820))")
Explanation:
The first section till "or" returns the parent since all such parents will have linked epic and second part after "or" will only return the subtask of all such parents that are linked to epic.
I am not sure if there is any need to install the script, and to check you can start typing "parent in hav...." if this shows the function "havingSubtaskIssuesFromQuery" you are good to go.
Hi all. Try installing the free add-on AM Utils (not a vendor here... just a user) and use the following query:
issue in issuesSubtasks("'Epic Link' = ABC-4820") or "Epic Link" = ABC-4820
The first part returns all subtasks, the second one all tasks, stories, bugs or others you may have directly connected to the epic.
Works fine here.
Cheers!
yup... does not work
I have 'closed' this thread to new replies as it is quite dated and we have an accepted answer to the original question. Please feel free to open a new question should this be desired.
It looks like you're new here. Sign in or register to get started.