I have an principle to implement. If the issue is cancelled, all its subtasks shall be cancelled automatically without screen checking only if the subtask has an action from current status to the "cancelled" status.
I have following codes but don't know how to get ACTION_ID which can transition the subtask from current status to a given status ( here, the given status is "cancelled" ). any one could kindly help?
def subTasks = issue.getSubTaskObjects()
subTasks.each {
def validationResult = issueService.validateTransition(user, it.id, ACTION_ID, issueInputParameters)
if (validationResult.isValid()) {
def issueResult = issueService.transition(user, validationResult)
}
}