Filter for open subtasks where parent is closed

Marissa Carey October 17, 2018

Could someone please help me to figure out a filter that will allow me to see all parent issues in all projects that are closed but the subtasks are open?

3 answers

3 votes
Alexey Matveev
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.
October 17, 2018

Hello,

You would need an add-on for it. For example, you could use the Power Scripts add-on:

https://marketplace.atlassian.com/apps/43318/power-scripts-jira-script-automation?hosting=cloud&tab=overview

You could write the following JQL query:

key in hasSubtasks("status = Open") and status = Closed
Thomas April 24, 2020

Hi Alexey,

i tried with Power Scripts. The module hasSubtasks is enabled.

 

The query

project = "TEST" AND key in hasSubtasks("status = Backlog") and status = Done

does not find issues. But there are some.

 

Is there anything else I need?

 

Best regards
Thomas

Alexey Matveev
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.
April 24, 2020

Hello @Thomas!

You do not need something else. Could you paste a screenshot of an issue, which is in the TEST project, the status is Done and it has a subtask or subtasks, which are in the Backlog status? 

Thomas April 24, 2020

Hello Alexey,

here is the screenshot:
image.png

Projektkey here is ITSD

Alexey Matveev
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.
April 24, 2020

Then your JQL query should be

project = "ITSD" AND key in hasSubtasks("status = Backlog") and status = Done
Thomas April 24, 2020

yes, but there are zero results 

caglad
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.
May 10, 2020

interested in this query too

Thomas May 11, 2020

Hi,

this query works for me:

key in parentsOf("project = \"YOUR Projectname\" AND status = Backlog") AND status = Done
Suresh.Kumar June 15, 2021

I am getting below error. How to resolve the issue

Unable to find JQL function 'parentsOf(project = "Project Management" AND status = Backlog)'.

Thomas June 15, 2021

You need Power Scripts add-on.

0 votes
host321 May 10, 2022

Can smbd please help in writing JQL query filter for closed Story and Task but opened subtasks (statuses re-opened, blocked for development, code review, ready for retesting, testing) to find it quick?

0 votes
Daniel Turczanski - __JQL Search Extensions
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
June 16, 2021

Hey @Suresh_Kumar ,

If it's a one-off job you can always export the issues to a spreadsheet and do your analysis there.

Standard JQL doesn't easily allow it but the results can be quickly found using our professional indexing service JQL Search Extensions.

This query finds finished issues with unfinished subtasks.

issue in parentsOfSubtasksInQuery("resolution is empty") and status='Done'

I hope this helps!
Daniel

Suresh.Kumar June 22, 2021

Thanks for letting me know. I got it and able to see the results with search extensions

Suggest an answer

Log in or Sign up to answer