I like to push an issue programmatically through the workflow, by calling IssueService .validateTransition and then IssueService.transition.
And it works for a single transition.
Now if I want to push it through the second transition in the same plot, then the second validateTransition failed, saying that there was another who changes it. I believe that this means the first transition was not totally recorded.
How can we fast track 2 transitions in one operation?
Can you show us your code? You should wait until the next event fires before attemping the second fast-track.
In groovy code, it's simply
def action = wfm.getWorkflow(issue).allActions.find { it.name == transitionName }
IssueService.TransitionValidationResult res = is.validateTransition( execUser, issueKey.id, action.id, issueInputParams )
if (!res.valid) {
throw new IssueTrackerException(
"Validation failed "+ tvr.errorCollection.reasons )
}
def tres = is.transition(execUser, res)
But I want to transition the bug through 2 transitions right in this event. is there any way not to wait for the next event to do it?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
To be honest, I am not sure. It may require some testing. Personally, I would not think that would be possible. My impression however is that data is only stored on issue events. If the data from the first action hasn't been stored, the second action is invalid.
Given: Open -startprogress> In Progress -close> Close
Not working:
Should work:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.