It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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')"))

 

Nice, concise and perfect :)

issueFunction isn't available in my instance of Jira. Are you using another app plug-in?

Like Anthony Boisbouvier likes this

I think the OP is using ScriptRunner for his instance

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 Leader 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 Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you