Forums

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

How can I write a query that finds all children based on the ultimate parent?

Gavin Stone May 13, 2025

Our Jira is currently setup like this:
- High Level Objective
- Initiative
- Epic
- Stories in Epic

Let's say the reference for the high level objective is AB-12345. How do I write a query that essentially says "Find all issues where the ultimate parents is AB-12345". I am doing this so I can create a plan that has these items in it. We're currently doing this with a label but I feel there must be an easier way to do this.

Any help appreciated!

2 answers

1 accepted

2 votes
Answer accepted
Barnali Putatunda
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.
May 13, 2025

Hi Gavin,

Welcome to the comunity!
You can get all the child issues under AB-12345 using the following JQL: 

issue in (portfolioChildIssuesOf("AB-12345"))


But remember, Currently, portfolioChildIssuesOf() only accepts one input parameter in the form of an issue key. This makes searching for child issues of multiple parents in one JQL not possible, and  it also doesn't allow search of child issues based on other query parameters. Issues under Team managed projects are also not included.

Hope this answers your question.

Best Regards,
Barnali

Gavin Stone May 13, 2025

Excellent - this works well enough for my use case. Thank you, Barnali!

1 vote
Sebastian Krzewiński
Community Champion
May 13, 2025

Hi @Gavin Stone 

 

By "Find all issues where the ultimate parents is AB-12345" are you thinking about all tickets (Initiative, Epic, Story) under your objective or just Stories?

Gavin Stone May 13, 2025

Hi Sebastian - I need all the initiative/epic/story level. We have a plan that allows a drill down through all those levels so we need more than just stories. Hope that helps clarify.

Suggest an answer

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

Atlassian Community Events