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?
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 :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
issueFunction isn't available in my instance of Jira. Are you using another app plug-in?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think the OP is using ScriptRunner for his instance
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
i am getting error as mentioned below and not getting the results. Please suggest
Field 'issueFunction' does not exist or you do not have permission to view it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Small tweak to make it more generalized using statuscategory rather than a list of statuses.
statuscategory != Done AND issueFunction in parentsOf("statuscategory = Done") AND NOT issuefunction in parentsof("statuscategory != Done")
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Great that you found out a workaround. But I could see " Not In " works with Status. on JIRA 7.1.6
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It works. But your suggested solution doesn't refine the list. See screenshot as a proof (same issues are listed for 2 different queries):
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.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
NOT IN operator supports Status field. Could you cross check if you have 'Open' state for the above project or issue type ?
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.
Hi Myroslav,
change it to (... and status not in (Closed)")
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you, Thomas. Syntax was corrected, but still both queries return the same output:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.