Forums

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

How do I create a filter for this? Parent / child

Wendy Thorneloe
Contributor
February 14, 2025

Hi all

Can anyone help me with this?

I want to see all child issues from all the parents that have field PI set to PI 5

Show me all child issues (Story, Task) where parent (Feature) has  PI = PI 5.

How do I do this?

Thanks

Wendy

2 answers

0 votes
Hannes Obweger - JXL for Jira
Atlassian Partner
February 24, 2025

Hi @Wendy Thorneloe,

unfortunately, this is trickier than one might think; as a hierarchical query, it would really require some kind of "join" or "subquery", which isn't available in plain Jira/JQL.

A few directions forward:

  • If it's a one-off thing, you could first query the relevant parents, and then use the keys of these epics in a second query, in an "parent in (KEY-1, KEY-2, ...)" clause.

If you want to run your search dynamically, without manually "stitching" two queries together, you'll need extra tooling:

  • You might be able to use Jira Automation to propagate parent information down to the children, and then use the respective field(s) on the children to include them into your filter. Obviously, this will add a fair bit of complexity to your system.
  • There's different apps from the Atlassian Marketplace that can help with that. First, there's a number of apps that extend JQL by additional functions, including hierarchy-related functions. I've used JQL Search Extensions a few times and it works well.
  • Alternatively, you could try one of the more hierarchy-focused apps from the Marketplace. These apps typically have their own ways of figuring out parent/child relationships between issues, and provide more powerful ways of searching through issue hierarchies. I myself work on such an app, in which your use case would be easy to solve - I'll provide more details below.

Hope this helps,

Best,

Hannes

Hannes Obweger - JXL for Jira
Atlassian Partner
February 24, 2025

Just to expand on the last point, this is how this would look in the app that my team and I are working on: JXL for Jira. Put simply, you'd create a sheet with all issues that are potentially relevant to you, enable the default issue hierarchy (that's just one click), and then use JXL filtering capabilities to narrow down to the issues that you care about:

epics-by-label.gif

(I'm using labels here, but it would work the same way with any other field.)

Once you have your list of issues, you can work on these directly in JXL (much like you'd do in e.g. Excel or Google Sheets), trigger various operations in Jira, or export them for further processing.

Any questions just let me know!

0 votes
Arka Ganguly
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!
February 14, 2025

You can use JIRA Query Language (JQL) to achieve this. Try the following query:

issueType in (Story, Task) AND "Parent Link" in (filter="Parent Issues with PI 5")

However, since JIRA does not allow direct querying of parent fields from child issues, you will first need to create a filter for the parent issues (Features) that have PI = PI 5.

Step 1: Create a filter for Parent Issues (Features)

Run this JQL and save it as a filter (e.g., Parent Issues with PI 5):

issueType = Feature AND PI = "PI 5"

Step 2: Query Child Issues

Now, use the saved filter in another JQL query to fetch child issues:

issueType in (Story, Task) AND "Parent Link" in (filter="Parent Issues with PI 5")

If you are using Advanced Roadmaps for Jira (formerly Portfolio for Jira), you can replace "Parent Link" with "Epic Link" if the parent-child relationship is through Epics:

issueType in (Story, Task) AND "Epic Link" in (filter="Parent Issues with PI 5")

Alternative (Using Scriptrunner)

If you have the ScriptRunner plugin, you can use this more direct JQL:

issueFunction in issuesInEpics("issueType = Feature AND PI = 'PI 5'")

 

Wendy Thorneloe
Contributor
February 17, 2025

Hi @Arka Ganguly 

I'm getting an error when I try running your jql script (Step 2) with my filter in it.

Says they are expecting something other than Filter =.

It gives me an error when I try to paste it here in this comment.

Malcolm_Dixon
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!
April 1, 2025

Also can't get this to work? Is this through an extension?

 

Attempting, 

 

issueType in (Story, Task) AND "Parent Link" in (filter="Parent Issues with PI 5")

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