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 Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Fadoua M. Boualem
Published Monday in Trello

Using Trello to manage events

As a Jira power user, I was at first doubtful that Trello could benefit my workflow. Jira already uses boards (ones you can customize!), so why would I even need to use Trello?! In this post you will...

466 views 7 8
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