How to list "In Progress" Stories with no active subtasks?

Anderson Sant_Anna December 9, 2024

Hi everyone,
I'm trying to create a JQL query to list all Stories that are currently in the "In Progress" status, but only if they have no active subtasks.

I want to exclude any Stories that have subtasks in progress, but I’m not sure how to achieve this. Does anyone know how I can create this type of query?

Any help would be greatly appreciated!

Thank you in advance!

3 answers

1 vote
Harshit Grover
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.
December 9, 2024

Hi @Anderson Sant_Anna 

Jira doesn't natively support hierarchical queries to check the statuses of subtasks directly relative to their parent. However, you can achieve your desired outcome using these approaches:

If you have access to plugins like ScriptRunner, you can create a JQL query that includes logic for subtasks.

Example with ScriptRunner:

 

issueFunction in parentsOf("status = 'In Progress'") AND issuetype = Story AND NOT issueFunction in subtasksOf("status = 'In Progress'")

Explanation:

  • parentsOf: Finds parent issues of subtasks meeting a condition.
  • subtasksOf: Finds subtasks of a parent issue meeting a condition.

This excludes any Stories where a subtask is in the "In Progress" status.


Regards,

Harshit

0 votes
Hannes Obweger - JXL for Jira
Atlassian Partner
December 19, 2024

Hi @Anderson Sant_Anna

if you're open to solutions from the Atlassian Marketplace, this would be easy to do using 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 sub-tasks done percentage.

With these, you can build the list that you're looking for in just a couple of clicks, like so:

sub-task-done-percentage.gif

As you can see above, you can easily sort and filter by the sub-tasks done percentage, 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.

Once you've narrowed down your list of issues, you can work on your issues directly in JXL, trigger various operations in Jira, or export your issues with just one click.

All this just works - there's no scripting or automation whatsoever required.

Any questions just let me know,

Best,

Hannes

 

0 votes
Dan -minware-
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.
December 9, 2024

Hi @Anderson Sant_Anna -

I see your recent questions and if you are open to working with a 3rd party we should be able to help with both at minware.

Disclaimer: we are a 3rd party marketplace partner!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events