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

Accepted Answer
0 votes

Ooops..my actionId was wrong. 

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Thursday in Marketplace Apps

You + one app + a desert island...

Hi all! My name is Miles and I work on the Marketplace team. We’re looking for better ways to recommend and suggest apps that are truly crowd favorites, so of course we wanted to poll the Community. ...

334 views 3 5
Join discussion

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