Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,457,191
Community Members
 
Community Events
176
Community Groups

JQL Help: Return All Issues AND sub Issues WHERE Parent Issue matches set of JQL

I am trying to create a filter for use in Roadmaps where I want to show only a subset of project issues. 


  • I created a custom checkbox field, milestone type, and I want the filter to return all of the issues with 'milestone type = contract' AND the child issues of issues WHERE 'milestone = contract'
  • Here is my current query (generated from basic search) that returns only issues where 'milestone=contract' and not those issues subtasks: project = XXX AND "Milestone Type[Checkboxes]" = Contract order by created DESC

    How can I return the 'child of' issues? I have seen some similar posts but haven't found an answer that works. I am hesitant to get something like script runner app but will if that is the ONLY solution (surely Jira has a way as this is a simple request). 


2 answers

2 accepted

0 votes
Answer accepted

Hi @Nikki Leonard 

As you're on Jira Cloud, the correct answer is to get an app that provides JQL extensions you're looking for.

With standard JQL, you can only get a list of issues and export them to Excel for further processing. This works if you want to do a one-off analysis. If your use case is more dynamic than that, look beyond standard Jira.

Standard JQL doesn't easily allow it, but you can quickly find the results using our professional indexing service JQL Search Extensions

  • You can use this query to find subtasks whose parents have Milestone Type[Checkboxes]' = Contract
issue in subtasksOfParentsInQuery("'Milestone Type[Checkboxes]' = Contract")
  • If you want to return both parents and subtasks please use the query below:
issue in subtasksOfParentsInQuery("'Milestone Type[Checkboxes]' = Contract") or project = XXX AND "Milestone Type[Checkboxes]" = Contract 

Check out the documentation for more examples.

If you have any other questions, please contact our support. We’ll be happy to help you!
Best regards,
Maurício

0 votes
Answer accepted
Trudy Claspill Community Leader Dec 01, 2022

Hello @Nikki Leonard 

Jira does not natively provide a way for you to get issues and their children in one query when the list of parents is dynamic. This page provides info on the native search functions available specific to Advanced Roadmaps relationships.

https://support.atlassian.com/jira-software-cloud/docs/search-for-advanced-roadmaps-custom-fields-in-jql/

You will have to use a third party app to get what you want. ScriptRunner is one such app, but there are also others, such as Jira Search Extensions.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Site Admin
TAGS

Atlassian Community Events