I am trying to transition my subtask from subtask workflow.
I am using this validation code:
IssueService.TransitionValidationResult transitionValidationResult = issueService.validateTransition(user, issue.getId(), 41, issueInputParameters, transitionOptions)
41 is the transition to which I need to transition. I have already log printed the available transitions using:
WorkflowManager workflowManager = ComponentAccessor.getWorkflowManager();
JiraWorkflow workflow = workflowManager.getWorkflow(issue);
This tells me that 41 is an available transition.
But when i try to validate the transition, it throws an error that
Transition Validation errors: It seems that you have tried to perform a workflow operation (Rejected) that is not valid for the current state of this issue ....... The likely cause is that somebody has changed the issue recently, please look at the issue history for details.
Another weird thing is that, the same thing, for the same transition, I had used this script from parent workflow and from the parent workflow, the transition is valid and I am able to transition successfully.
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events