Unable to transition subtask from subtask workflow, but works fine from parent workflow

harsha nambiar September 25, 2019

Hi all,

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);
log.error("Available transition"+workflow.getLinkedStep(issue.getStatus()).getActions());

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.

0 answers

Suggest an answer

Log in or Sign up to answer