Hello dear community,
Task
I have created a script that should execute parent transitions depending on changing the state of a child.
This works fine if there is just a single transition to be executed.
Sometimes I need more than one transition in sequence (as the second transition is only valid if the first transition has been finished) and created a loop to execute these transitions:
[ ...listofTransitions...].forEach{ myTransition ->
logger.warn("State of parent issue $parentIssueKey from child $currentIssueKey must be changed to $myTransition")
try {
parentIssue.transition(myTransition)
} catch (transitionError)
{
println("transition error: $transitionError")
}
}
Challenge
The first transition works always fine, but for the second there is an transition error:
transition error: com.adaptavist.hapi.jira.exceptions.issues.IssueTransitionValidationException: No such action: 'Review Design (FSDS)' available. Available actions are 'Reject', 'Execute SVT after suc. Integration Test', 'Continue Implementation'
This indicates that the first transition change has not been finished during the script execution as the listed transitions actions are valid only for the first transition.
But on the GUI I can see that the first transition was successful.
I thought I could improve this by adding a sleep function, but it seems that the transition execution is only finished when the complete script is finished.
Question
How is it possible to sync the second transition with the finish of the first transition is completely executed?
Your help is appreciated very much!
Best regards
Nicolas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.