Groovy: check resolution of specific sub-tasks.

Serj Shcherbakov January 13, 2016

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

0 votes
Answer accepted
Serj Shcherbakov January 13, 2016

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
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 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
TAGS
AUG Leaders

Atlassian Community Events