JQL can not pull child epic in parent card: Request for Custom Filter

Lili April 26, 2024

Hello, we have project board that has  "project" as the issue type for the cards on the board. I need to pull the child issues from a parent card.

I am able to successfully get to the parent level of the card, I am not able to get down to the child issue.

I am able to get down to the parent level with the JQL

PROJECT = xx AND PARENT = XX

as I attempt to drill into the child issues via JQL, the results are returning empty. 

When I go to the board and click the parent card I can see all of the child issues. 

 

We do not have script runner installed or any other third party apps. I am looking for JQL code/function, that will pull the child epics from a parent card.

 

Tried but does not work 

-parentepic

-issuetype = epic

 

 

1 answer

1 accepted

0 votes
Answer accepted
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 26, 2024

Hello @Lili 

Welcome to the Atlassian community.

Are you using a Premium or Standard subscription? If you see "Plans" among the options on the menu bar then you have a Premium subscription.

Are you an administrator for your Jira instance? I ask because it would be help to us to see the Issue Type Hierarchy that is available for your system. That information can be obtained by a Jira Administrator, or it can be determined from working with an advanced roadmap Plan.

I am unclear about the issue type hierarchy you are using, so I'm not able to definitively advise you on a function that will work for your situation.

What is the issue between the "project" issue type and the "parent" from which you are trying to get child issues? 

If you can explain to us the issue type hierarchy and point out the reference issue you start with and then which issues related to that you are trying to get, we might be able to offer you relevant advice.

Lili April 29, 2024

Good Morning Trudy, 

Thank you for your help! We have a Premium subscription, and I am the administrator of my instance. 

I did not set up the issue type hierarchy for this project. 

When I filter the below: 

project = "PROJECT" and parent= "PARENT" and AND parentEpic in (PARENT) 

I get an epic that is not tied to the PARENT card. When I click into the Parent Card, I see a list of child issues. No matter what I code for, the child issues are not pulling up for me. 

Thank you!

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 29, 2024

Hello Lili,

To view the issue hierarchy

  1. click the gear icon near your avatar in the upper right and select Issues 
  2. In the new screen in the panel on the left near the top of the list will be the Issue Type Hierarchy option.

A table will display showing level names on the left and issue type icons on the right. Can you share a screen image of that and also tell us the issue type for each icon?

We also need to know the Type of the project you are searching. The type information is found on the View All Projects page found under the Projects menu.

The Parent field will find the child issues of the specified issue, based on the Issue Type Hierarchy, if those issues have been properly made children of the specified issue. 

parentEpic will find only child issues and subtasks under an Epic issue type. For proper use of that function refer to

https://support.atlassian.com/jira-software-cloud/docs/jql-functions/#parentEpic--

Can you also provide a screen image of the PARENT card you mentioned showing its child issues? That will help us confirm the issues are LinkedIn the right way to be found using the Parent field.

Lili April 29, 2024

Hi Trudy, 


It is a company managed project, and due to this I am limited to what I can share on this public forum. 

 

 

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 29, 2024

Thank you for the additional information.

Can you confirm that you are trying to get the child issues of the Epic? If so, then you should be able to get the child issues of that epic with the simple JQL:

parent=<issue key for the Epic>

...or using the parentEpic() function

issue in parentEpic(<issue key for the Epic>)

...though this second one will get both the child issues of the Epic and the subtasks of the child issues.

 

Lili April 29, 2024

Thank you Trudy! 

Yes, I am querying to get the child issues for the parent epic. 

When I ran the code I am getting the error below. Is the issue key for the epic different from what is in the ticket? Both suggestions are not working for me.

"Unable to find JQL function 'parentEpic()'."

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 29, 2024

Hm, so do I. The function is listed in the documentation.

Try using the other JQL I suggested.

Lili April 29, 2024

I am getting error unable to find JQL function PARENT(X) when I attempt to use the other option. 

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 29, 2024

If you used

parent(<epic issue key>)

...with parentheses then you have used the wrong syntax.

"parent" is not a function, it is a field. You need to use it thus:

parent=<issue key for the Epic>

Lili April 29, 2024

Hi Trudy, 

It worked successfully for me. 

Thank you for your assistance! 

Lili May 1, 2024

Happy Wednesday Trudy! 

For the JQL query above, what is the appropriate code or method to use to show linked issues? 

In addition, to show work completed the past  three weeks, would statuscategory be best practice or do you recommend another syntax?

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 3, 2024

Hello Lili,

Issues linked to what? Are you trying to retrieve not just the child issues of the Epic, but also the issues linked to those child issues?

If you change the output display from Details to List, you can add the Linked Issues field to the output columns. For each issue you retrieve that column will then show the issue keys of issues linked to it, but no other detail for the linked issues.

Screenshot 2024-05-03 at 10.48.55 AM.png

Work completed in the past three weeks - what is your definition of "work completed"? It isn't possible to query based on the date the issue changed to the Done Status Category. You could query on the Resolved date being within the past three weeks:

Resolved >= -3w

The Resolved date is set when the Resolution field is set and the date is cleared when the Resolution field is cleared. The Resolution fields should be getting set when your issues transition to a green/Done status, but it is possible that has not been set up correctly.

You could also query based on the issue currently being in the Done Status Category, and checking that they transitioned to one of your "done" statuses in the past three weeks.

statusCategory=Done and status changed to (Done,Cancelled) after -3w

Suggest an answer

Log in or Sign up to answer