Weird error transitioing issue programmatically

Amro Hassaan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 1, 2017

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

0 votes
Answer accepted
Amro Hassaan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 1, 2017

Ooops..my actionId was wrong. 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events