Find parent issues that are not closed while all their sub-tasks are in Closed status

Hi all,

It happens that QA team forgets to move parent story from RTT into Closed status, despite all sub-tasks are already Closed. I want to be able to filter such issues.

Query:

status = RTT and issueFunction in parentsOf("project = XXX and status = Closed")

returns parent issues that have at least one sub-task in Closed status, but I need it to return parent issues that have ALL sub-tasks in Closed status.

Any ideas how to achive that?

 

3 answers

1 accepted

Continued to fight with Jira and have found one query solution:

project = XXX and status !=Closed and 
(issueFunction in parentsOf("status in ('Closed')")
and not issueFunction in parentsOf("status in
(Open, 'In progress', 'Code review', 'Ready to test')"))

 

Can you try a workaround like this ? 

status = RTT and ( issueFunction in parentsOf("project = XXX and status = Closed") AND (issueFunction in parentsOf("project = XXX and status not in ( Open, In Progres)" ) ? 

 Please note, I couldn't test this since I don't have access to any instance at the moment. 

Hi Vishnukumar,

Thank you for your idea. But, much to my regret Jira doesn't support "not in" operator for status field in parentsOf function.

Here is a Jira error message in full:

  • Error in scripted function: parentsOf, see below
  • Operator 'not in' does not support the non-list value '"Open"' for field 'status'.

NOT IN operator supports Status field. Could you cross check if you have 'Open' state for the above project or issue type ? 

Yes, here is a proof:Issue+Navigator+-+Ciklum+Interactive+JIRA+-+Google+Chrome+2017-06-23+11.46.35.png

 

Thomas Schlegel Community Champion Jun 23, 2017

Hi Myroslav,

change it to (... and status not in (Closed)")

Thank you, Thomas. Syntax was corrected, but still both queries return the same output:

Issue+Navigator+-+Ciklum+Interactive+JIRA+-+Google+Chrome+2017-06-23+12.18.29.png+%E2%80%8E-+Photos+2017-06-23+12.20.16.png

Actually, I've found a slight workaround using 2 queries from Jira and further comparison in GSheets or Excel:

This query will return all stories that have at least one incomplete subtask:

status = RTT and issueFunction in parentsOf("project = XXX and status in (Open, 'In progress', 'Code review', RTT)")

This query will return all stories that have at least one closed subtask:

status = RTT and issueFunction in parentsOf("project = XXX and status = Closed")

Then in Spreadsheets we'll filter all issues from last query that aren't present in first - that will be our target list.

Great that you found out a workaround. But I could see " Not In " works with Status. on JIRA 7.1.6 Capture.JPG

It works. But your suggested solution doesn't refine the list. See screenshot as a proof (same issues are listed for 2 different queries): 

Issue+Navigator+-+Ciklum+Interactive+JIRA+-+Google+Chrome+2017-06-23+12.18.29.png+%E2%80%8E-+Photos+2017-06-23+12.20.16.png

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 ...

3,311 views 14 20
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