Groovy: check resolution of specific sub-tasks.

HI there!
I use groovy script runner v.3.1.4

Goal:  need to check all the sub-task type "Approval Item" must have resolution type "Complete".

Currently i try with this:

issue.subTaskObjects.findAll{it.issueTypeObject.name ="Approval Item"}.any{it.resolutionObject.name == "Complete"}

But seems this is works incorrectly.
Can someone help me.
Please.

2 answers

1 accepted

Remark: i raised this script from subtasks. So i changed this code, and this works fine for me.

Sorry for spam guys, hope may help someone else.


Here is it:

issue.parentObject.subTaskObjects.findAll{it.issueTypeObject.name ="Approval Item"}.each{it.resolutionObject.name == "Complete"}

You could use jql into issue navigator "issuetype = Bug and resolution != Done". And you will see all trouble issues. It is comfortable to have a filter which is used for gadjets and subscriptions.

Suggest an answer

Log in or Join to answer
Community showcase
Teodora [Botron]
Published Thursday in Marketplace Apps

Jira Inferno: The Nine Circles of Jira Administration Hell

If you spend enough time as a Jira admin - whether you are managing a single, mid-sized instance, a large enterprise one or juggling multiple instances at once - you will eventually find yourself in ...

239 views 0 11
Read article

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