Weird error transitioing issue programmatically

Hi All,

Am getting a weird error from validationResult in a tiny scriptrunner script listener i am writing to transtion issue in project A if linked issue in Project B transitioned.

the error message is "

2017-12-01 17:53:55,369 ERROR [runner.ScriptRunnerImpl]: startProgress true 2017-12-01 17:53:55,371 ERROR [runner.ScriptRunnerImpl]: Errors: {} Error Messages: [It seems that you have tried to perform a workflow operation (Start Progress) that is not valid for the current state of this issue (CTT-91). The likely cause is that somebody has changed the issue recently, please look at the issue history for details.]" 

while the transition is actually available and doable from the UI. ie. start progress is available.

I am not sure what is wrong here and the error is not descriptive enough as to why it is failing.

here is the code

if (event.eventTypeId.equals(EventType.ISSUE_RESOLVED_ID) && startProgress) {
TransitionValidationResult validationResult = issueService.validateTransition(user, it.getId(), 71, issueInputParameters)
if (validationResult.isValid()){
issueService.transition(user, validationResult)
}
}

startProgress is a boolean flag that indicates whether in fact that start progress action is available from the current status. which it is in this case.

thanks for the help

1 answer

1 accepted

Ooops..my actionId was wrong. 

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published May 30, 2018 in Marketplace Apps

Three tips for boosting your board's efficiency with Story Maps

Trello is one of the most effective tools for driving your sprints. It's customizable for every Agile team and product owners and Scrum masters (SM) love it. However, Agile teams often struggle with:...

845 views 2 9
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you