JQL nested parent function

Christian Scharrer July 3, 2023

I want to write a JQL query that delivers all tasks and their subtasks that are linked to an Epic. It is a team-managed project which brings some JQL restrictions. 

the query

parent in (EPIC-1, ... , EPIC-N)

 delivers all task or user stories.

I hoped that a nested query like

parent in (parent in (EPIC-1, ... , EPIC-N))

delivers all sub-tasks of the corresponding stories, but it doesn't work. Any ideas how I could solve this?

2 answers

1 accepted

4 votes
Answer accepted
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.
July 3, 2023

Hi @Christian Scharrer 

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

Unfortunately, using JQL of Jira, 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 display all stories and subtasks linked to an Epic:

issue in childrenOfIssuesInQueryRecursive(“issuekey in (EPIC-1, EPIC-2)”) 

Please note that we have created a support ticket https://jqlsearchextensions.atlassian.net/servicedesk/customer/portal/2/SEARCH-1121 in our portal, and we request you to sign in to the portal and let us know the username so that we can mark you as the reporter, and then you will be able to access the ticket. 

 Please find the below link to signup to the portal: https://jqlsearchextensions.atlassian.net/servicedesk/customer/portal/2 

Looking forward to hearing from you!

 Thanks,
Charlotte

Dan Tombs
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 10, 2023

Hey @Charlotte Santos -Appfire- 

Just want to bring this one back up. Can the extensions app go higher then epic in terms of the recursive JQL.

 

If we inputted the following JQL for hierarchy below would it return all results issues below:

issue in childrenOfIssuesInQueryRecursive(“issuekey in (COPS-1)”) 
  • COPS-1 (project)
    • COPS-2 (workstream)
      • COPS-5 (epic)
        • COPS-8 (story)
        • COPS-9 (story)
          • COPS-10 (sub-task)
      • COPS-6 (epic)
    • COPS-3 (workstream)
      • COPS-7 (epic)
    • COPS-4 (workstream)
Like Adam Sterrie likes this
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.
July 10, 2023

Hi @Dan Tombs 

Yes, it can go higher than epics. You would get all of those results.

Give it a try, you have 30 days to test the app for free: JQL Search Extensions for Jira 

And if you need any help with the queries you can open a ticket for us in our portal

Regards,

Charlotte

Like Dan Tombs likes this
Dan Tombs
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 11, 2023

@Charlotte Santos -Appfire-

Thanks for the note. I'll take a look and reach out to your support team if I have any questions.

Dan Tombs
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 11, 2023

@Charlotte Santos -Appfire-

Is there any way you can add me to that feature request for dynamic use of the extensions. Thinking of use within gadgets etc. Thanks.

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.
July 12, 2023

Hey @Dan Tombs

You can use it in a more dynamic way, for example, if you use:

issue in childrenOfIssuesInQueryRecursive("project='ABC' and type=Initiative")

You would get all epics, stories and subtasks in initiatives in project ABC.

Is that what you mean?

Regards,

Charlotte

0 votes
Markus Fredén
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.
July 3, 2023

Hi @Christian Scharrer ,

You can make use of the JQL function "sssueFunction";

parent in (EPIC-1, ..., EPIC-N) OR issueFunction in linkedIssuesOf("parent in (EPIC-1, ..., EPIC-N)")

/Markus 

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.
July 3, 2023

@Christian Scharrer 

There is not support for nesting filters like that in native JQL.

And note that "issueFunction in linkedIssuesOf" suggested by @Markus Fredén is not native Jira functionality.

That is available only if you have the appropriate third party app installed; i.e. Adaptavist Enhanced Search or Adaptavist ScriptRunner.

Like # people like this
Christian Scharrer July 28, 2023

This doesn't work in Jira cloud. This was the answer (but the link doesn't  work):


The "linkedIssuesOf" JQL function provided by "Adaptavist Scriptrunner" for Jira Server works differently in Jira Cloud. Run it directly in "Enhanced Search" instead. See the documentation for more details: https://docs.adaptavist.com/sr4jc/latest/features/scriptrunner-jql-keywords-functions

Suggest an answer

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

Atlassian Community Events