Current state is 0, requested state is 1

Vilhjálmur Hallgrímsson February 10, 2016

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

0 votes
Answer accepted
Kristian Walker _Adaptavist_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 2, 2016

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

0 votes
Vilhjálmur Hallgrímsson March 1, 2016

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 

 

 

Kristian Walker _Adaptavist_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 2, 2016

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

0 votes
Vilhjálmur Hallgrímsson March 1, 2016

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

0 votes
Kristian Walker _Adaptavist_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 18, 2016

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

Suggest an answer

Log in or Sign up to answer