JQL to filter out task that doesnt have subtask yet

Abdullah Said
Contributor
November 5, 2024

as the title says, i don't want workaround, i need the JQL only because i need to make quick filter

3 answers

1 vote
Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 5, 2024

You would need an addon unless the following would be an option...

use automation to add a label to the parent whenever a sub task was created. Then you could search for the absence of that label, e.g. type = story and labels !=  "has-children". Obviously, this will only addressed future issues also, you might have to consider the scenario where all children are removed in which case you would have to have an automation to remove the label.

1 vote
Aron Gombas _Midori_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 5, 2024

Out of the box I think it is still not possible, and the feature request is still open.

You could however use a custom field of the Number type, called "Subtask count" to store the current count of subtasks of an issue. You could use automation rules to initialize it to zero at creation, and refresh its value when the issue is updated.

Then in JQL it works like:

type = Task and "Subtask count" = 0
0 votes
Hannes Obweger - JXL for Jira
Atlassian Partner
November 10, 2024

Hi @Abdullah Said

if you're open to solutions from the Atlassian Marketplace, you may want to have a look at the app that my team and I are working on, JXL for Jira.

JXL is a full-fledged spreadsheet/table view for your issues that allows viewing, inline-editing, sorting, and filtering by all your issue fields, much like you’d do in e.g. Excel or Google Sheets. It also comes with a long list of so-called smart columns that aren’t natively available, including the number of sub-tasks.

This is how it looks in action:

number-of-subtasks-zero.gif

As you can see above, you can easily sort and filter by the number of sub-tasks, and also use it across JXL's advanced features, such as support for (configurable) issue hierarchies, issue grouping by any issue field(s), sum-ups, or conditional formatting.

This all just works - there's no scripting or automation whatsoever required.

Any questions just let me know,

Best,

Hannes

Suggest an answer

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

Atlassian Community Events