Complex JQL queries - finding specific issues with parents, subtasks, etc.

Hi, this is the query I'm trying to do:

All issues that are Bugs with 0 subtasks OR subtasks with Parents as a Bug.

The main reason with this is because our QA team has filed various sub-tasks within a Bug because they broke the parent bug even further. For me I just want to see the scope of the parent bug and how much stuff is within it. When I do an issue search, if I just search for IssueType "sub-task" it'll show all my Stories subtasks. If I just do Bugs and sub-tasks, it'll also show the parent bug in my list as well as the children sub-tasks separately and that gets confusing.

Any ideas?

1 answer

1 accepted

4 votes

This is pretty similar to this question, but simpler.

To find Bugs without subtasks:

issueFunction not in hasSubtasks() and issuetype = Bug

To find subtasks of Bugs:

issueFunction in subtasksOf("issuetype = Bug")

You can combine these to create:

(issueFunction not in hasSubtasks() and issuetype = Bug) OR issueFunction in subtasksOf("issuetype = Bug")

Thanks for that. Any ideas on how to do it witout the extra plugin? Was trying to avoid using those since I don't have access to install.

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,775 views 11 18
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot