Trying to create a filter to return all child issues of all the Epics in my Jira Project

Ikuh Henry September 4, 2018

Trying to create a filter for all child issues of Epics in my Jira Project without using scriptrunner but the advance filter only.

example:

issuekey = EEEP-963 OR issuekey in childIssuesOf(EEEP-963) OR issuekey = EEEP-992 OR issuekey in childIssuesOf(EEEP-992) AND issuetype in ("Portfolio Epic", Capability, Epic, Story) ORDER BY issuetype ASC

this gives me Exactly what I need for my report – the Epic down to the lowest children (sub-task) if it exist in any story.

However, that is limited to manually entering known issuekey. I want to be able to return all Epic, and their respective childIssues. So if I have 100 Epics I should also get children of each epic under them.

Any suggestion or solution to this?

5 answers

1 accepted

2 votes
Answer accepted
Alexey Matveev
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.
September 4, 2018

Hello,

You would need a plugin for it. For example, you could use JQL Search Extensions for Jira.

https://marketplace.atlassian.com/apps/1214791/jql-search-extensions-for-jira?hosting=cloud&tab=overview

Your JQL query would look like this:

issue in allIssuesInEpic("your JQL query")

You can find more info here:

https://jqlsearchextensions.atlassian.net/wiki/spaces/SEARCH/pages/30497099/JQL+Reference+Server#JQLReference(Server)-AllIssuesInEpic(jql-queryorissuekey)

Ikuh Henry September 4, 2018

@Alexey Matveev thanks for your help, i will request this extension from my IT team. 

Alexey Matveev
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.
September 4, 2018

You are welcome!

Ikuh Henry September 5, 2018

Thanks, the update from my IT team is that they wont want to buy another add on or extenssion. for this purpose. therefore i will still appreciate any solution on how to use the jira filter to return same result. 

Like # people like this
6 votes
Nil Ister June 25, 2019

If you don't want to use a plug-in and if Initiative issue type is enabled, you can put all the epics under an initiative and use "issuekey in childIssueOf(InitiativeKey)" to get all epics, tasks, and sub-tasks linked.

Andrew Watson August 24, 2019

Thanks for posting a solution that does not involve the use of a plug-in.

Like # people like this
Amanda Culver October 23, 2019

This only returns the issues for a KNOWN initiative, does it extend to finding all child issues of all initiatives (I can't seem to find a way to nest an initiative search)

 

I'd like something like

issuekey in childIssueOf(project=MyProj and issuetype=initiative)

but it doesn't seem to exist.  Any clues ?

Like # people like this
Nil Ister October 29, 2019

That's a good question. You're right, for what I wrote to work you need to manually put known Epics under a known Initiative. I found a couple of solutions (not sure if they are 100% solutions to your question but maybe they might help you find a better solution!). 

1. Found issue in parent(JqlQuery).This function returns subtasks of given JqlQuery. Found it on https://www.j-tricks.com/jqlt-subtask-functions.html. I think this is also a plug in so I couldn't find this filter in my company's Jira. Give it a try:

project = ABC AND issue in parent("issuetype = Initiative") (change Initiative to Epic if you'd like to)

2. issueFunction in issuesInEpics("project =ABC") - This will return all type of issues of Epics in that project. Found it on https://scriptrunner.adaptavist.com/latest/jira/jql-functions.html. Scriptrunner is a plug in.

3. If you don't know the issue keys of the Epics you want the tasks and subtasks of, you could find them by using the following:

project = ABC AND issueFunction in epicsOf("resolution = unresolved")

In this case, they all need to satisfy a condition. In this example that condition is the project and the resolution.

After finding the key of these issues you could use them to get all of the tasks and subtasks.

Like # people like this
Amanda Culver May 14, 2020

solved >

The following gives you all issuetypes linked to any issues picked up by a filter

  1. Create a filter to list all of the initiatives,
  2. save it,
  3. get the filter number from the saved filter's URL, then...

 

|  issue in linkedIssuesFromFilter(30785)

Like Corinne ROEHRI likes this
Corinne ROEHRI December 8, 2020

This function doesn't exist...! I use JIRA version 8.6.1

Genevieve Bolduc May 7, 2021

@Corinne ROEHRI Did you ever find a solution?  We are looking for the same thing.  Thanks!

Ulrich Kone June 27, 2023

Hello

I think those filters can perhaps help you

 

Try this one : issuetype = "Initiative" OR issueFunction in portfolioChildrenOf("issuetype = 'Initiative'") If you want to see only all your Initiative issues and their child issues.

 

And this one : issuetype = "Initiative" OR issueFunction in portfolioChildrenOf("issuetype = 'Initiative'") OR issueFunction in linkedIssuesOf("issueFunction in portfolioChildrenOf(\"issuetype = 'Initiative'\")", "is epic of") If you want to see all your Initiative issues with their child issues and the child issues of their child issues

 

I hope this can help y'all solve the issue.

Let me know if it's suit it

4 votes
Andy January 19, 2023

In case anyone else stumbles across this, who cannot access the more obscure JQL calls. I have an answer that doesn't involve a plug in:

project = ABC AND issuekey = XYZ-1234 OR issuekey in portfolioChildIssuesOf(XYZ-1234)

 

This does not give a tree structure, but will list all work items.

Hoang Tran October 2, 2023

But requires Jira Premium

Ted November 16, 2023

Indeed, was struggling with this for a long time.

issuekey in portfolioChildIssuesOf("<issue-key>") is the magic JQL phrase I was looking for. 

2 votes
Daniel Brvnišťan February 26, 2020

I also failed to find a solution not requiring an add-on. As I see this a logical extension of JQL, I filed a feature suggestion:

https://jira.atlassian.com/browse/JRASERVER-70710

I would appreciate votes / feedback.

Thanks,
Daniel

Symantha Gates January 12, 2021

upvoted - it's super frustrating this is not available, seems basic to the tenets of most Agile implementations

Amanda Culver February 16, 2021

UpVoted too.  It's still gathering interest.

0 votes
Lime Trees September 5, 2018

Hi,

you can try our add-on Epic Finder which has many useful functions to find epics and their issues that fulfill different conditions. Please have a look here for more details.

For some examples how to use this add-on, please go to Ultimate Guide.

Regards,

Lime Trees Support Team

Ikuh Henry September 5, 2018

Thanks, the update from my IT team is that they wont want to buy another add on or extenssion. for this purpose. therefore i will still appreciate any solution on how to use the jira filter to return same result

Suggest an answer

Log in or Sign up to answer