Trying to put condition on "Resolved" transition on parent in workflow.
Resolved is allowed only if
1. children subtask type= bug and children status =Verified
or
2. any subtask type and children status = Resolved
def passesCondition = true
def subTasks = issue.getSubTaskObjects()
subTasks.each {
if (it.issueTypeObject.name == "Bug") {
if (it.statusObject.name != "Verified")
passesCondition = false
} else {
if (it.statusObject.name != "Resolved")
passesCondition = false
}
}
It noted on script that syntaxes are deprecated. Not sure what are syntaxes.
Additionally, will this work under Workflow condition or I need to call scriptrunner listener?
We are on Jira 7.011 and Scriptrunner 5.1.6.2
Tried suggeste issue.getStatus(), but it does not seem to be working.
I would appreciate your suggestions.
