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
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Bridget Sauer
Published Thursday in Marketplace Apps

Calling all developers––You're invited to Atlas Camp 2018

 Atlas Camp   is our developer event which will take place in Barcelona, Spain  from the 6th -7th of   September . This is a great opportunity to meet other developers and get n...

362 views 0 6
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