It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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

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
Community showcase
Posted in Jira

Demo Den Ep. 7: New Jira Cloud Reports

Learn how to use two new reports for next-gen projects in Jira Cloud:  Cumulative flow diagram and Sprint burndown chart. Ivan Teong, Product Manager, Jira Software, demos the Cumulative ...

273 views 1 2
Join discussion

Community Events

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

Events near you