Hi, I'm looking to create a condition on a transition that is dependent on whether or not siblings of a certain issue type are in a particular status.
I've found a solution from 2016 but code has since been deprecated.
def parent = issue.parentObject
def otherSubtasks = parent.subTaskObjects.findAll { it.issueTypeObject.name in ["A", "B"]}
return otherSubtasks.every {
it.statusObject.name == "Resolved"
}
Now we are supposed to use getIssueType() and getStatus().
Two questions:
- How do I use getIssueType with the "otherSubtasks" array?
- I'm not sure what the code looks like for the getStatus replacement.
I know this is wrong but wanted to show I tried:
import com.atlassian.jira.issue.Issue
def parent = issue.parentObject
def otherSubtasks = parent.subTaskObjects.findAll { issue.issueType.name == "Estimate"}
return otherSubtasks.every {
otherSubtasks.getStatus() = "Final"
}