Forums

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

JQL Query to get list of Child JIRAs

Pritam Rakshit
Contributor
July 9, 2024

Hello All,

I am using the below jql query to get list of Scenario and EPICs for a particular label.

However i also want to pull the Child EPICs under Scenario and Story's linked to the EPICs. Can you please advise how do i expand my query.

 

(type in (Scenario, Initiative) AND labels = "customer" OR type = Epic AND "parent link" is EMPTY AND labels = "customer" OR issueFunction in portfolioParentsOf("type = Epic and labels = 'customer'")) AND status not in (Rejected, Canceled, Cancelled)

I also tried below query

(issuetype in (Scenario, Concept) AND labels = "customer") OR (issuetype = Epic AND issueFunction in linkedIssuesOf("issuetype = Scenario AND labels = 'customer'", "is parent of"))

 

Regards,

Pritam Rakshit

2 answers

0 votes
Prosper Agwegiokhe
Contributor
July 10, 2024

Hi @Pritam Rakshit,

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

The app my team works, JQL Search Extensions for Jira, you can use the query below to get your desired results:

issue in childrenOfIssuesInQuery("type in (Scenario, Initiative) and labels = 'customer'") or issue in parentsOfIssuesInQueryRecursive("") and labels = 'customer'

Please contact our support if you have any other questions about this query.
We’ll be happy to help you!

Best regards.

Pritam Rakshit
Contributor
July 10, 2024

I used the below jql

 

issueFunction in portfolioChildrenOf("labels = 'customer'") AND issuetype = Epic)

Pritam Rakshit
Contributor
July 10, 2024

In our JIRA version i don't have the option for childrenOfIssuesInQuery.

0 votes
guismb July 10, 2024

Hey @Pritam Rakshit , one quick question, your relationship seems to go above the 3 level on JIRA standard plan, are you using the Premium plan or a 3rd party plugin ?

By looking at your issuefunction I'm assuming you're using script runner.. In that case this may help, probably need to adapt to your relationship on issuetypes. 

issueFunction in subtasksOf("Additional JQL search here to look for the parent issues you want to define")

 

Pritam Rakshit
Contributor
July 10, 2024

Hi,

I am not sure about the plan, we use access provided from our organisation.

I tried your function however it didn't return the EPICs under the Scenario having labels customer

issueFunction in subtasksOf("issueType = Scenario AND labels = 'customer'")

I also tried to add it to the entire query however that also didn't work.

type in (Scenario, Initiative) AND labels = "customer" OR type = Epic AND "parent link" is EMPTY AND labels = "customer" OR issueFunction in portfolioParentsOf("type = Epic and labels = 'customer'") OR issueFunction in subtasksOf("issueType = Scenario AND labels = 'customer'") AND status not in (Rejected, Canceled, Cancelled)

Like John Funk likes this
guismb July 10, 2024

I would recommend then first understanding which tools are you available to use, as I said, the standard JIRA plan does not go beyond 3 levels which mean you can only look for Epic, User Story and Subtask, this would also mean some functions wont work in the JQL like issueFunction (this is a function that ScriptRunner adds to your JIRA instance).

 

Pritam Rakshit
Contributor
July 10, 2024

I used the below jql and it worked. 

 

issueFunction in portfolioChildrenOf("labels = 'customer'") AND issuetype = Epic

Like guismb likes this

Suggest an answer

Log in or Sign up to answer