Filter: Get issues by epic with their subtasks?

Erik Hennerfors October 15, 2014

Hi

I'm trying to figure out a filter that shows all issues for an Epic but their subtasks is not showing, currently the filter looks like:

issuetype != Epic AND "Epic Link" = GUMK-5 AND project = GuideMaker ORDER BY Rank ASC

Is it possible to get the issues subtest also? Which now does not show

 

Regards 

10 answers

7 votes
Shankar Sanjel June 7, 2018

No plugin

"Epic Link" =PROJ-XX OR issue in childIssuesOf("PROJ-XX")

abhijeetbh January 15, 2019

issue in descendantIssues("PROJ-XX")"

For JIRA v7.6.9

To have better performance use additional filter attributes like "project = PROJ AND issue in descendantIssues("PROJ-XX")"

Junio Fernandes January 15, 2019

"No plugin"? Is this in cloud?

And...

"For JIRA v7.6.9", which addon are you using? Function descendantIssues is not available.

Like LCD likes this
abhijeetbh January 15, 2019

Yes, it's Enterprise release - Deployed in-house

Alan Quandt February 11, 2019

Thank you, thank you, thank you!   Works, no plugins Server 7.9 

Josef Galun August 29, 2019

Great! Works perferkt in Server Version v7.11.2.
Thank you!

Kim Dinh March 10, 2020

Thank you!!!  Works great without using Labels...

KAGITHALA BABU ANVESH
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 18, 2020

Hi I'm using 8.14.0

Can someone please post the new jql to get all stories and sub-tasks

My Epic key = ABD-16

Story Key = ABCD-20

sub-task key = ABCD-72

 

how can i display all stories and  sub-tasks in "Epic" by writing JQL

Like Jenn Rakestraw likes this
1 vote
Daniel Alonso March 8, 2018

Is there any solution for Cloud instances?

aida March 22, 2018

Yes there is several

Here is post from Senior Product Manager on https://community.atlassian.com/t5/Jira-Software-questions/JQL-to-show-all-issues-AND-subtasks-in-the-Epic/qaq-p/346433

 

13 January 2017

Hi everyone,

As part of the migration of Tempo Timesheets to a new technology platform, the tempoEpicIssues() JQL function is either already removed or will be removed soon (depending on whether your instance has a license for Tempo Timesheets).

However, I'm pleased to announce the parentEpic function is now available in JIRA Cloud as a replacement. Searching with parentEpic will return all the issues in the specified epic(s) AND their sub-tasks. The syntax is a little bit different than a standard JQL functions – it's more like searching with a field. So

project = JRA and parentEpic = JRA-123

will return all issues and sub-tasks in the JRA project that are in the JRA-123 epic. The function also supports the != , IN , and NOT IN operators. So you could also search something like

project = JRA and parentEpic in (JRA-123, JRA-456) 

and you will get all issues and sub-tasks in either the JRA-123 or JRA-456 epics.

Refer to the documentation for more information. Happy searching!

Dave Meyer

Senior Product Manager, JIRA

Like # people like this
Deanna Lee April 18, 2018

Hello,

I am trying to create a filter that will pull in all stories, tasks, and subtasks within an epic. I do not have the parentEpic function. (I do, however, have Parent and Parent Link.)

Is there plugin-free workaround to pull in subtasks without the parentEpic function?

Thank you,

Deanna

Junio Fernandes April 18, 2018

Hope this could help.

((issuetype in (Story, Task, Sub-task) AND issuekey in issuesSubtasks ("'Epic Link' = XXX-99")) OR (issuetype in (Story, Task) AND "Epic Link" = XXX-99))

See my reply to original post. 

Like Maria Oat likes this
Deanna Lee April 18, 2018

Thanks, Junio. Looks like I need the AM Utils add on for this fix, correct? Unfortunately I'm not able to download this (per my company).

Junio Fernandes April 18, 2018

Yes! You'll need it. And it's free (thanks cPrime). Your company needs to understand the benefits of acquiring such a plugin that helps their employees, if you're using Server. This plugin doesn't work in the cloud version.

Artyom Surzhikov November 8, 2020

Hey can I do something like this 

issuetype!=Epic AND parentEpic in (project=XXX and issuetype=Epic)

 

So I want to get all subtasks of the Epics, which are in a specific project? 

 

And what's the difference between parentEpic and Epic Link? 

 

Thank you 

Ashley Renlund November 11, 2020

"Epic Link" applies to stories, tasks, your standard issue types.  "parentEpic" will find both standard issue types and subtasks.

I'm not aware of a way to nest JQL queries, alas!  So I would do this in two steps.  First, find the epics in your project:

issuetype=Epic and project=XXX

Make a note of all of those ticket keys.

Then to get all stories, tasks, and sub-tasks that belong to those epics (without recapitulating the epics themselves):

parentEpic in (XXX-1, XXX-2, XXX-3) and issuetype not in (Epic)

where XXX-1 etc. are the keys that you identified in step 1. 

Artyom Surzhikov November 12, 2020

I know about this way, but thanks a lot for bringing it again, I'm not looking for it, because as you mentioned you need to note all of the tickets, and I'm looking for a generic way, which would work across all Epics in a project.

Something like give me all tickets linked to all Epics in XXX project

Rahul_RVS_Support
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
November 12, 2020

Hi @Artyom Surzhikov 

If you are using Jira server, you might want to try out our add-on to get your complete Epic Hierarchy.

Agile Tools - Epic Tree and Time in Status 

It will provide you the below features

  • Sum up your Epic's Time Spent, Original Estimate, Time Remaining, and Percent Complete
  • Display and manage Epics/Issues of your project
  • Edit Issue summary, time estimates, story points and assignee on the tree with real time updates in the progress
  • Rolled up percentage completion and at issue level as well
  • JQL based Time in Status Report

Epic Tree Screen_Hierarchy_New.PNG

Like Artyom Surzhikov likes this
Artyom Surzhikov November 12, 2020

Thanks @Rahul_RVS_Support any cloud support? 

Rahul_RVS_Support
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
December 6, 2020

Hi @Artyom Surzhikov 

We have published the cloud version of our add-on.

You might want to try it out.

Agile Tools - Epic Tree and Time in Status 

 

Thanks

1 vote
Junio Fernandes November 29, 2017

Due to Why do subtasks disappear when I filter my board using Epic Links, you can't.

In my case I use AM Utils (free add-on) to search all issues and subtasks on it:

A simple example:

issuekey in (issuesSubtasks("'Epic Link' = XXX-99")) ORDER BY Rank ASC

With this I can make boards that swinlanes with stories or projects besides the Epic Link.

Gary Fitzgerald December 13, 2017

Thanks Junio, Works great!

Can you please explain how you are using this for boards that swimlanes with stories or projects besides the Epic Link?

Junio Fernandes December 26, 2017

I use this as the filter in the board and configures the board to swinlane by story, projects or epics. If it's not the answer you're looking for, can you be more specific as I can help you more?

Deleted user July 26, 2019

FINALLY!!!!! Thank you extremely! THIS is the answer most people are looking for.

Like Junio Fernandes likes this
0 votes
Parvathy Manishanker davey June 28, 2021

I Use Jira cloud and this worked for me 

parentEpic IN( JALP-3, JALP-4) AND issuetype in (STORY, Sub-task, Task, Bug)

0 votes
Ionascu Irina November 16, 2020

Hello, do you know any other free plugin which can help with this issue, to list down in the JQL filter the Epic and the tasks/subtasks associated to it? I just saw that AM Utils it is not free anymore. Thanks!

Artyom Surzhikov November 16, 2020

I'm using this one issuetype!=Epic and parentEpic in (BBR-XXX, [KeysOfEpic]) this should be doing all you need in Jira Cloud. 

Ionascu Irina November 17, 2020

Hi @Artyom Surzhikov , sorry, I forgot to mention that I am using Jira server... 

0 votes
Maria Oat May 28, 2019

Hi Guys, 

You can vote on this issue A subtask cannot be assigned to an epic https://jira.atlassian.com/browse/JSWSERVER-15705

Tks, 

Fabio

Bibi Shaliza Mohamed April 22, 2020

hi

0 votes
Fernando Andrade April 3, 2019

Cloud: project = XX and parentEpic = XX-1

returns stories and subtasks

0 votes
Suzan.Bader@agilesolutions.co.uk October 4, 2018

I can't understand Why it does not work for me.

I have a similar issue, Defined the Epic 5 epic and lots of subtasks. 

I now want to search for all the subtasks of an Epic  but nothing is returning

My Query is : 

project = DCPW  AND type= Story and parentEpic = DCPW-8 ORDER BY key ASC

 

One thing to mention when I have the cloud version and when I created the Epic, there were no mandatory fields. So I have to add the Epic name in Configuration later on in the hope that it will help with my search.

 

Please help

Brian Mertens January 15, 2019

Hi Suzan,

Your query indicates the condition "AND type = Story."  This condition will exclude all issue types except Story (including subtasks).  Try removing that condition and see if your query works as expected.

Like Daniel Alonso likes this
0 votes
Denning Coates August 7, 2018

I simply adjusted the JQL on the JIRA filter from Epic Link = JIRA-1234 to parentEpic = JIRA-1234, and this worked for me. 

This is a real game changer for returning more accurate results to include sub task issue types tickets as well as the standard issue type tickets. 

This is especially useful for time tracking.  We have JIRA users that sometimes log their work on sub-tasks associated to the Epic, and for those tickets to populate the "Time Reports" Add on, you must adjust your JQL from Epic Link to parentEpic for any sub-task issues to populate the time report.  

Ranjith Meda July 2, 2020

this worked for me, Thanks!

0 votes
Geert Graat
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 15, 2014

Hi,

See this thread: https://answers.atlassian.com/questions/177329 which discusses a lot of options. You will need plugins though, no out of the box solution.

Regards,

Geert

Suggest an answer

Log in or Sign up to answer