Use JQL to find all child issues under an Initiative

Yi Meng
Contributor
March 22, 2024

Hi Community, 

In my Jira cloud, I have set up my issue type hierarchy as: Initiative --> Epic --> Story

I have make one initiative as parent of several Epics and the Epics have stories as their child issues. And I have create a plan to include initiative, Epic and story. Right now, I'm using JQL as ' issuetype in (Initiative, Epic, story) OR parent in (Epic-1, Epic-2, Epic-3). This works now since I don't have to many Epics yet. But it would be hard to maintain if we have more Epics in the future. 

I don't have apps like scriptrunner installed in my Jira. So I can't use the advance search provided by scriptrunner. 

Is it possible to get all the child issues and grandchild issues for an Initiative using JQL? I think the function childIssuesOf() is no longer available now. 

Thanks

3 answers

1 accepted

4 votes
Answer accepted
Ste Wright
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 22, 2024

Hi @Yi Meng 

This should work:

issue in portfolioChildIssuesOf("ABC-123")

ABC-123 is the issue key for your Initiative.

Ste

Marcin Krasicki
Contributor
March 22, 2024

@Ste Wright  isn't 

portfolioChildIssuesOf

require Portfolio for Jira as well as

childIssuesOf

function? 

Ste Wright
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 22, 2024

Not in Cloud.

You need a Premium plan - as you need Plans (formerly known as Advanced Roadmaps, or Portfolio for Jira).

Then you get access to this function.

Ste

Like # people like this
Marcin Krasicki
Contributor
March 22, 2024

Good to know. Thanks!

Like Ste Wright likes this
Nicholas Schrader
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!
August 14, 2024

How would I do this if I am pulling the imitative from Jira Align? I have used issuekey in childIssuesOf("") for my standard Jira's, but I am on a new team who uses Jira Align for initiatives and I cannot pull data down on my SQL statements 

andy.johnston
Contributor
November 27, 2024

Just wanted to add that I have Premium at work, and this function is awesome and does exactly what I needed it to do here.

0 votes
Charlotte Santos -Appfire-
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.
March 22, 2024

Hi @Yi Meng 

I’m Charlotte, a support engineer at Appfire and I’m here to help you.

Unfortunately, natively, you’ll not be able to do it dynamically.

In the app where my team works, JQL Search Extensions for Jira, you can use this query to get all initiatives and their children:

issue in childrenOfIssuesInQueryRecursive("type=Initiative") OR issue in parentsOfIssuesInQuery("type=Epic")

Please contact our support if you have any other questions about this query.

We’ll be happy to help you! 😁

Michael Valentin
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!
October 24, 2024

Unfortunately, JQL Search Extensions for Jira doesn't work well.

e.g.

issue in childrenOfIssuesInQuery("Team[Team] = 05a58275-92dd-48fc-ac3c-a2105545f9af")

returns No Results

while the JQL itself

Team[Team] = 05a58275-92dd-48fc-ac3c-a2105545f9af

finds all of the parent items

Charlotte Santos -Appfire-
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 29, 2024

Hi @Michael Valentin

Have your checked the status of the app? If the status of the app is not Ready to Use, the issues were not indexed yet by the app and that's why you're not getting the correct results.

I just tested and the function works for me:

Screenshot 2024-10-29 at 14.51.59.png

To check if the status of the app is ready to use, select Get Started from the side navigation bar, and you should see it in the top right corner of the screen:

Screenshot 2024-10-29 at 14.57.17.png

If the status is anything other than "Ready to Use", it indicates that a full index hasn't been performed, and it could be due to permission issues. Please follow the steps in this documentation to rectify it.

Feel free to contact our support if you have any other questions about this issue.

We’ll be happy to help you! 😁

All the best, 

Charlotte S. | Support Engineer
Appfire Support Team

Michael Valentin
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!
October 30, 2024

Thanks Charlotte.  Our system shows Ready to Use.  It now produces some results.  I've saved my query as a filter to be able to run it in the Jira JQL window.

I now notice that it doesn't return sub-tasks of parent issues (e.g. stories, tasks) where the epic team is specified.  Only goes one level deep.

 

Thoughts?

0 votes
Marcin Krasicki
Contributor
March 22, 2024

jira.png

Yi Meng
Contributor
March 22, 2024

You're right. JQL doesn't support recursive query. But I think this function can solve my problem. 

portfolioChildIssuesOf("ABC-123")  

 I can use linedIssues and parent together but it's a little bit tedious if I have many Epics. In general initiatives are less than Epics. :)

Thank you for your help. 

Suggest an answer

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

Atlassian Community Events