Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Issue [force] transition to done on creation post condition script

Amar Parthasarathy October 12, 2018

Hello,

 

I have an interesting transition. During "Create" action I have a post condition running a script runner to validate data. if necessary data condition is True then I would like to directly transition to "Done" else will stay in "Issue Created" (No transition in the post condition groovy script executed ) . I am not able to transition and getting following error: [runner.ScriptRunnerImpl]: Could not transition issue ** , errors: Errors: {}
Error Messages: [It seems that you have tried to perform a workflow operation (Close Request) 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.].

 

I am guessing since the Issue is in the process of getting created, this transition work if it was after issue created step. 

 

is this transition possible ? 

just wanted to add, if I run a listener after "Issue Created" step, the transition works fine. having trouble to transition from "Create" action.

2018-10-12 11_12_39-Request Workflow_v2 - CS - QA2.png

1 answer

1 accepted

0 votes
Answer accepted
Deleted user October 12, 2018

Hi @Amar Parthasarathy,

 

Which groovy post function have you used?

Did you try Fast track transition from script runner? This will move the issue based on the condition (here you can validate data ). Make sure that you have added this post function below the native post function "Create the issue originally". This will ensure that ticket gets created and will move it only when the condition gets satisfied. If the condition is failed, it will be in the initial state only.

Regards,

Swathi

Amar Parthasarathy October 15, 2018

Thanks Swathi. I am using Custom script post-function (inline script) and performing external calls to get data. And I was transition based on the condition. never able to transition.

But now I am setting the values in the Custom script and then using "Fast-track transition " to transition.

Works like a charm. Thank you very much. 

Suggest an answer

Log in or Sign up to answer