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"}
0 votes
Vasiliy Zverev Community Champion Jan 13, 2016

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 Sign up to answer
Community showcase
Asked Thursday in Jira Ops

I'm John Allspaw, Ask Me Anything about incident analysis and postmortems

I'm John Allspaw, co-founder of   Adaptive Capacity Labs, where we help teams use their incidents to learn and improve. We bring research-driven methods and approaches to drive effective inciden...

464 views 2 5
View question

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