How can JQL Query all sub tasks and Stories linked to a specific Epic?

Naama Lev
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.
November 3, 2015

Hello Experts, 

I am trying to create a JQL query that will present me all stories and subtaks that are related to a specific Epic

When I create the following JQL Query : "Epic Link" = "epicname" I get only the stories, as the sub-tasks are not linked directly to the epic

Does anyone have a good idea how can I perform this query?

Thanks

Naama

4 answers

3 votes
Pankaj Pimple March 1, 2017

"Epic Link" = "epicname" OR issueFunction in subtasksOf('"Epic Link" = "epicname"') worked for me given by Sana. Thanks

Federico Perez Marina June 19, 2018

Thanks it worked for me also

Tash Solangi February 9, 2021

Thank you!  This worked perfectly!

3 votes
SanaS
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.
November 3, 2015

Hi Naama,

What you can do is to use the JQL Functions provided by Scriptrunner, then it will be a query that looks like this:

"Epic Link" = "epicname" OR issueFunction in subtasksOf('"Epic Link" = "epicname"')

This way you get both the stories and their sub-tasks.

Pankaj Pimple March 1, 2017

"Epic Link" = "epicname" OR issueFunction in subtasksOf('"Epic Link" = "epicname"') worked for me given by Sana. Thanks..

0 votes
Pablo Beltran
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.
November 7, 2015

Links Hierarchy allows to visualize it and export the Agile Hierarchy to Excel.

Just the same engine used to build the visual hierarchy is exposed as JQL function if you prefer this way...

0 votes
Naama Lev
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.
November 4, 2015

Hi, @Sana Safai

Thank you for your reply , 

I have script runner installed, 

But when I used the filter suggested , i got the following error:

"Unable to find JQL function 'subtasksOf("Epic Link" = "infr-126)'.

Can you please help me understand why?

Thanks you!

Naama

6")'."

SanaS
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.
November 4, 2015

Hi, do you have the issueFunction in part as well? If you do, then try reindexing and then try it again.

SanaS
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.
November 4, 2015

Also there is a " missing after infr-126

Naama Lev
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.
November 4, 2015

Hi @Sana Safai Thanks for your reply - I have reindexed JIRA - I have run the following query: "Epic Link" = "V-DCMA" OR issueFunction in subtasksOf('"Epic Link" = "V-DCMA"') - and got the following error: Unable to find JQL function 'subtasksOf("Epic Link" = "V-DCMA")'. Can you please help me understand why? Thanks Naama

SanaS
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.
November 5, 2015

Hi, just try to use the issuekey for the epic instead of V-DCMA, then it should work.

Naama Lev
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.
November 5, 2015

Hi @Sana Safai Thanks for your help! I have tried both ways: "Epic Link" = "V-DCMA" OR issueFunction in subtasksOf('"Epic Link" = "V-DCMA"') "Epic Link" = INFR-1266 OR issueFunction in subtasksOf('"Epic Link" = INFR-1266') and i get this error - do i need to install anything to have those jql functions (I do have script runner installed) Thanks Naama

SanaS
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.
November 5, 2015

Almost there, try: "Epic Link" = INFR-1266 OR issueFunction in subtasksOf('"Epic Link" = "INFR-1266"')

Suggest an answer

Log in or Sign up to answer