During a issue Create, i want to check a Custom field (single select drop down) if specific value is selected we want to set issue status to a specific status.
I have added follwoing as apost function in create transition
cfValues['Submit for Review?']?.value == 'YES, Submit for Review'
and if this is true then set issue to "MGR Review" as a status
the post function script runs but i see following error
2017-06-01 08:59:26,898 ERROR [utils.WorkflowUtils]: In-depth checking of each condition follows to determine why the action was not allowed.
2017-06-01 08:59:26,898 ERROR [utils.WorkflowUtils]:
It seems that you have tried to perform a workflow operation (MGR Review) that is not valid for the current state of this issue (ITCR-41). The likely cause is that somebody has changed the issue recently, please look at the issue history for details.
2017-06-01 08:59:26,898 ERROR [utils.WorkflowUtils]: Not attempting transition because of above errors.
Issue: ITCR-41
{
"full.module.key": "com.onresolve.jira.groovy.groovyrunnerrungroovy-function (java.lang.String)",
"canned-script": "com.onresolve.scriptrunner.canned.jira.workflow.postfunctions.FasttrackTransition (java.lang.String)",
"class.name": "com.onresolve.jira.groovy.GroovyFunctionPlugin (java.lang.String)",
"issue": "ITCR-41 (com.atlassian.jira.issue.IssueImpl)",
"passesCondition": "true (java.lang.Boolean)",
"transientVars": {
"issue": "ITCR-41 (com.atlassian.jira.issue.IssueImpl)",
"configuration": "com.opensymphony.workflow.config.DefaultConfiguration@4c533635",
"issueProperties": "{} (com.google.common.collect.EmptyImmutableBiMap)",
"currentSteps": "[SimpleStep@7[owner=, actionId=0, status=open]] (java.util.ArrayList)",
"store": "com.opensymphony.workflow.spi.ofbiz.OfbizWorkflowStore@37b2a50b",
"descriptor": "com.atlassian.jira.workflow.ImmutableWorkflowDescriptor@ab265f1",
"entry": "com.opensymphony.workflow.spi.SimpleWorkflowEntry@11034744",
"oldStatus": "IssueConstantImpl[[GenericEntity:Status][sequence,13][statuscategory,2][name,DRAFT][iconurl,/][description,null][id,10006]] (com.atlassian.jira.issue.status.StatusImpl)",
"context": "com.opensymphony.workflow.basic.BasicWorkflowContext@5c0fbaec",
"createdStep": "SimpleStep@7[owner=, actionId=0, status=open] (com.opensymphony.workflow.spi.SimpleStep)",
"originalissueobject": "null (org.codehaus.groovy.runtime.NullObject)",
"actionId": "1 (java.lang.Integer)",
"pkey": "ITCR (java.lang.String)",
"changeItems": "[com.atlassian.jira.issue.history.ChangeItemBean@3fc6dcec[fieldType=jira,field=status,from=10006,fromString=DRAFT,to=10006,toString=DRAFT,created=<null>]] (java.util.LinkedList)"
},
"log": "org.apache.log4j.Logger@2b60f0f2",
"issueInputParameters": "com.atlassian.jira.issue.IssueInputParametersImpl@26c2ab08"
}
Elapsed: 11 ms
CPU time: 0 ms
Cancel
Is there a valid transition from the status after the create transition to the "MGR Review" status in your workflow? Can you attach a screenshot of your workflow please?
Also what version of ScriptRunner and JIRA are you using?
Is there a more detailed error message in the full atlassian-jira.log file?
I faced the same issue. The destination transition was valid still was getting same error again and again.
Turns out the user I was using to perform the transition did not have "Transition issue" permission. Once required permission granted, the issue was resolved.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.