Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to list all stories and subtasks of an epic?

Joao Santos
Contributor
September 11, 2024

Hi everyone,

 

Is there a way, using JQL, to list the epic, all it's stories and subtasks on the same list?

I am using a team managed Project and saw some references to ParentEpic but it doesn't work, somehow it only returns the actual epic.

 

Any way to achive this without using third-party apps?

 

thank you in advance.

 

5 answers

0 votes
Charles Allen
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 22, 2025

Hello,

Not sure I've seen a formal answer to your question so maybe this will help someone else who is using a team managed project. I've used the following query to list all stories, tasks and sub-tasks for an epic in my projects. 

issuekey in ChildIssuesOf(ABC-9876)

- I then use AND and additional statements to further filter if needed, by status' for example. 

issuekey in ChildIssuesOf(ABC-9876) and status != Done

The above will display all issues including stories and subtasks beneath Epic ABC-9876 that are in any status except "Done"

0 votes
Diego Chen
Contributor
September 26, 2024

It is really a problem when your project is a team-managed project. I have too.You could try the JQL "parent in (EPIC-1)" to show all stories of the EPIC.

0 votes
shiva kumar Gosul
Contributor
September 11, 2024

 certainly, you can count the number of Tasks linked to corresponding epic. 

Go to Issues or structure and use this jql query "Epic link" = ABC-123

Above query will fetch all user story, Tasks and Defects if linked, if you want to know only Tasks or Story then

"Epic link" = ABC-123 AND issues Type = Task 

ABC-123 is Epic key. Let me know if you need further support.

All the Best!

Trudy Claspill
Community Champion
September 11, 2024

This does not fulfill the requirement to also get the subtasks under the child issues.

list the epic, all it's stories and subtasks 

Like shiva kumar Gosul likes this
shiva kumar Gosul
Contributor
September 15, 2024

Yes, above query is for user story and Tasks. To fetch sub-tasks too use belie extended query 

Epic link" = ABC-123 AND issues Type in (story, task, sub-task, technical task) 

Trudy Claspill
Community Champion
September 16, 2024

Your syntax is invalid.

It must be issuetype or type rather than issues type

Additionally, even with that corrected, your JQL does not return the sub-tasks under the issues that are within the Epic. The Epic issue key is not recorded in the sub-task issue.

Like shiva kumar Gosul likes this
shiva kumar Gosul
Contributor
September 27, 2024

I agree @Trudy Claspill it is issuetype or type, no space in between. 

using "Epic link" = ABC-123 should able to fetch all linked issues 

LynnG
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 2, 2024

This is the query I use:

issuekey IN portfolioChildIssuesOf("ABC-123"), returns all issue types related to the parent ABC-123

0 votes
Trudy Claspill
Community Champion
September 11, 2024

Hello @Joao Santos 

I believe this will give you what you want:

https://support.atlassian.com/jira-software-cloud/docs/jql-functions/#linkedissue

linkedissue = epic-issue-key

Joao Santos
Contributor
September 11, 2024

Hi @Trudy Claspill 

that behavior probably changed since it is only returning the epic itself

 

example_linkedissue.JPG

Trudy Claspill
Community Champion
September 11, 2024

It worked within my instance to display all the child issues and subtasks of those child issues, for an Epic in a Company Managed Software project.

 

Can you provide a screen image of BC-1247 showing enough of the issue to show that it has child issues?

Example:

Screenshot 2024-09-11 at 2.52.43 AM.png

Joao Santos
Contributor
September 11, 2024

Sure @Trudy Claspill !

in this print you can see that it has 5 stories and one of them has a subtask.

example_Epic_3.JPG

Trudy Claspill
Community Champion
September 11, 2024

What is the Type for the BC project?

Get that information from the Type column on the View All Projects page under the Projects menu.

Can you provide a screen image from the details view of the Epic, like the one I provided?

Joao Santos
Contributor
September 11, 2024

It's a Team-managed software.

We are using kanban template, not scrum, so I don't think I have that view (at least I don't know where to get it...)

any specific information or field you wanted to check?

 

Trudy Claspill
Community Champion
September 11, 2024

You can get that view by clicking directly on the issue key for the Epic to open the view that shows all the details of the Epic issue.

The linkeIssues option does not appear to work for Team Managed project; only for Epics in Company Managed projects.

parent=epic-issue-key

...will give you only the direct children of the Epic from a Team Managed project, not the subtasks of the children.

Jira does not natively support a way to get a list of subtasks based on a dynamically derived list of issues, so for your Team Managed project I think you will not be able to satisfy your requirement without a third party app.

Like Martin Fredrich likes this
0 votes
Martin Fredrich September 11, 2024

I was wrong!

In Jira Cloud, the linkedissue function now does support the Epic-Story relationship, and you can use it to retrieve all Stories, Tasks, and Subtasks related to a specific Epic.

 

linkedissue = ABC-123

Where ABC-123 is the key of your Epic, it will return:

  • The Epic itself.
  • All Stories and Tasks linked to the Epic.
  • Subtasks under those Stories and Tasks.

This is a recent change in Jira Cloud, and it simplifies the process of retrieving all issues related to an Epic without needing to use the "Epic Link" field or complex parent queries.

Thank you @Trudy Claspill 

Kind regards
Martin


In Jira Cloud, there is no built-in way with pure JQL to list both an epic, all its stories, and their sub-tasks in a single query, as JQL doesn't natively support hierarchical queries.

 

Joao Santos
Contributor
September 11, 2024

Hi @Martin Fredrich 

maybe that relationship is recent?

it doesn't seem to be working... please check my print on the reply above... am I missing something?

Martin Fredrich September 11, 2024

this is what I get with linkedissue = NINXXX-3
image.png

All related issues have the Epic as parent:
image.png

 

Joao Santos
Contributor
September 11, 2024

For some reason that is not working for me:

when I filter using linkedIssue='My_Epic' I get only get the actual Epic.

when I filter using Parent='My_Epic' I get only get the stories.

Trudy Claspill
Community Champion
September 11, 2024

That is because your Epic is in a Team Managed project.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events