Current state is 0, requested state is 1

I created a Fast-track transition as a Workflow post-function on an issue and it should fire every time a issue is created.

 All issues have priority = Normal initially so I use it as a condition to fire the event.

 Occasionally I get this error "Error creating issue: Can't transition workflow instance #192865. Current state is 0, requested state is 1"and when creating an issue but I have not been able to find any pattern when this happens.

 I have not found helpful information on this error on the internet so I'm hoping you can help.

FTerror.png

FTcondition.png

FTOrder.png


4 answers

1 accepted

This widget could not be displayed.

Hi Vilhjálmur,

I can see you have raised a support request which the development team have responded back saying this is due to a known issue with Mysql and the Fast Track Transition post function.

As this issue has been dealt with a support portal we can now consider this support query resolved.

Many Thanks

Kristian

This widget could not be displayed.

Hi Vilhjálmur,

After researching this issue it appears that the error you are seeing is due to the fact that the issue has not been created correctly and cannot be transitioned due to this.

I notice that you have other Scripted Post Functions on the create transition. Could i please ask that you remove these and try re running with post functions 1-4 and 7 from the current list to determine if one of the other post functions is causing the issue creation to fail.

If you still receive the same error after trying this can i please request that you provide the following information so we can try to replicate this issue locally.

  1. The versions of JIRA and SR that you are using.
  2. Confirmation that the transition being executed is part of the workflow being used by the project.
  3. A copy of the atlassian-jira.log from just after when you last encountered the error.
  4. Copies of each of the other scripted post functions in text format.
  5. A screenshot of the workflow that the project is using with the transition labels included.
  6. Confirmation if you have listeners configured which may be attempting to manipulate the issue before it has been created and transitioned.

Many Thanks

Kristian

This widget could not be displayed.

Hi Kristian

Thank your for your answer.

I have had hard time trying to reproduce this error and I have still not found the pattern.  I have been monitoring this in our system and this error seems to happen occasionally.

As far as I can tell this is what happens.  The user is creating an issue having fast-track post-function on the create issue transition. The error gets displayed in the UI and the user continues.  The system creates two identical issues in the system instead of one.  This is the big problem as our customer gets two issues and gets billed twice..

I caught one such event yesterday and checked the catalina.out log for this incident.

The following is an excerpt from the log

2016-03-01 09:58:49,852 http-bio-8080-exec-186 DEBUG bjornma 598x1325352x36 19bon3g 10.121.57.1,0:0:0:0:0:0:0:1 /secure/QuickCreateIssue.jspa [scriptrunner.jira.workflow.ScriptWorkflowFunction] ************* The taskValueis [ÚTSELT]

2016-03-01 09:58:49,852 http-bio-8080-exec-186 DEBUG bjornma 598x1325352x36 19bon3g 10.121.57.1,0:0:0:0:0:0:0:1 /secure/QuickCreateIssue.jspa [scriptrunner.jira.workflow.ScriptWorkflowFunction] ************* The NoConverted date class is  java.sql.Timestamp

2016-03-01 09:58:49,852 http-bio-8080-exec-186 DEBUG bjornma 598x1325352x36 19bon3g 10.121.57.1,0:0:0:0:0:0:0:1 /secure/QuickCreateIssue.jspa [scriptrunner.jira.workflow.ScriptWorkflowFunction] ************* The nav job task is  ÚTSELT

2016-03-01 09:58:49,852 http-bio-8080-exec-186 DEBUG bjornma 598x1325352x36 19bon3g 10.121.57.1,0:0:0:0:0:0:0:1 /secure/QuickCreateIssue.jspa [scriptrunner.jira.workflow.ScriptWorkflowFunction] ************* The tempodate class is  com.tempoplugin.core.datetime.api.TempoDateTime

2016-03-01 09:58:49,852 http-bio-8080-exec-186 DEBUG bjornma 598x1325352x36 19bon3g 10.121.57.1,0:0:0:0:0:0:0:1 /secure/QuickCreateIssue.jspa [scriptrunner.jira.workflow.ScriptWorkflowFunction] ************* The tempodate to string class is  2016-03-01T09:57:00.000

2016-03-01 09:58:49,852 http-bio-8080-exec-186 DEBUG bjornma 598x1325352x36 19bon3g 10.121.57.1,0:0:0:0:0:0:0:1 /secure/QuickCreateIssue.jspa [scriptrunner.jira.workflow.ScriptWorkflowFunction] ************* The class is  java.sql.Timestamp

2016-03-01 09:58:49,852 http-bio-8080-exec-186 DEBUG bjornma 598x1325352x36 19bon3g 10.121.57.1,0:0:0:0:0:0:0:1 /secure/QuickCreateIssue.jspa [scriptrunner.jira.workflow.ScriptWorkflowFunction] ************* taskValue [ÚTSELT]

2016-03-01 09:58:49,852 http-bio-8080-exec-186 DEBUG bjornma 598x1325352x36 19bon3g 10.121.57.1,0:0:0:0:0:0:0:1 /secure/QuickCreateIssue.jspa [scriptrunner.jira.workflow.ScriptWorkflowFunction] ************* taskValue.toString() ÚTSELT

2016-03-01 09:58:49,852 http-bio-8080-exec-186 DEBUG bjornma 598x1325352x36 19bon3g 10.121.57.1,0:0:0:0:0:0:0:1 /secure/QuickCreateIssue.jspa [scriptrunner.jira.workflow.ScriptWorkflowFunction] ************* issue.key HCM-36767

2016-03-01 09:58:49,852 http-bio-8080-exec-186 DEBUG bjornma 598x1325352x36 19bon3g 10.121.57.1,0:0:0:0:0:0:0:1 /secure/QuickCreateIssue.jspa [scriptrunner.jira.workflow.ScriptWorkflowFunction] ************* TempoDateTime.now() 2016-03-01T09:58:49.852

2016-03-01 09:58:49,852 http-bio-8080-exec-186 DEBUG bjornma 598x1325352x36 19bon3g 10.121.57.1,0:0:0:0:0:0:0:1 /secure/QuickCreateIssue.jspa [scriptrunner.jira.workflow.ScriptWorkflowFunction] ************* attributes [_JobTask_:ÚTSELT]

2016-03-01 09:58:49,852 http-bio-8080-exec-186 DEBUG bjornma 598x1325352x36 19bon3g 10.121.57.1,0:0:0:0:0:0:0:1 /secure/QuickCreateIssue.jspa [scriptrunner.jira.workflow.ScriptWorkflowFunction] ************* remaining 10000

2016-03-01 09:58:49,852 http-bio-8080-exec-186 DEBUG bjornma 598x1325352x36 19bon3g 10.121.57.1,0:0:0:0:0:0:0:1 /secure/QuickCreateIssue.jspa [scriptrunner.jira.workflow.ScriptWorkflowFunction] ************* currentUser bjornma(bjornma)

2016-03-01 09:58:49,852 http-bio-8080-exec-186 DEBUG bjornma 598x1325352x36 19bon3g 10.121.57.1,0:0:0:0:0:0:0:1 /secure/QuickCreateIssue.jspa [scriptrunner.jira.workflow.ScriptWorkflowFunction] ************* ScriptRunnerImpl.PLUGIN_KEY com.onresolve.jira.groovy.groovyrunner

2016-03-01 09:58:49,852 http-bio-8080-exec-186 DEBUG bjornma 598x1325352x36 19bon3g 10.121.57.1,0:0:0:0:0:0:0:1 /secure/QuickCreateIssue.jspa [scriptrunner.jira.workflow.ScriptWorkflowFunction] ************* timespentvalueL is 1800

2016-03-01 09:58:51,418 http-bio-8080-exec-186 ERROR bjornma 598x1325352x36 19bon3g 10.121.57.1,0:0:0:0:0:0:0:1 /secure/QuickCreateIssue.jspa [canned.jira.utils.ConditionUtils] *************************************************************************************

2016-03-01 09:58:51,418 http-bio-8080-exec-186 ERROR bjornma 598x1325352x36 19bon3g 10.121.57.1,0:0:0:0:0:0:0:1 /secure/QuickCreateIssue.jspa [canned.jira.utils.ConditionUtils] Condition failed on issue: HCM-36767, built-in script:com.onresolve.scriptrunner.canned.jira.workflow.postfunctions.FireEventWhen

org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:

Script439.groovy: 4:

[1] is a constant expression, but it should be a variable expression at line: 4 column: 2. File: Script439.groovy @ line 4, column 2.

  1=1

   ^

1 error

2016-03-01 09:58:51,418 http-bio-8080-exec-186 ERROR bjornma 598x1325352x36 19bon3g 10.121.57.1,0:0:0:0:0:0:0:1 /secure/QuickCreateIssue.jspa [canned.jira.utils.ConditionUtils] Script follows:

/*Workaround to try to fix bug

https://jamieechlin.atlassian.net/browse/GRV-691

*/

1=1

I hope this helps

-Vilhjalmur

This widget could not be displayed.

Hi Kristian

1. JIRA v6.4.4
2. The transition is being executed in our SR worflow
3. It seems that I can not create an attachment on this page but you can see excerpt from the log in my previous comment.
4. I cant create attachment here. Can I send you this in email instead?
5. Same as 3 and 4
6.  I am not aware of any listeners that should affect this  

My best

-Villi 

 

 

HI Vilhjamular,

As the issue is only happening sparadicly as you have mentioned in your previous comment and you are unable to replicate the issue locally, could I please ask you to raise a support request here with the logs and as much information as possible so that the Script Runner developers can look into this issue further for you.

Thanks

Kristian

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Tuesday in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

262 views 1 3
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