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!
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
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:
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.