Error getting logged for Fast Track Transition postfunction of script runner

I have redone the same code as given in the Fast Track Transition script. The only difference being i have written the same code for getAllWorkflowActions() in my existing groovy file. I have posted th entire code here

package com.onresolve.jira.groovy.canned.workflow.postfunctions

import org.apache.log4j.Category;
import java.util.List;
import java.util.Map;
import com.atlassian.crowd.embedded.api.User
import com.atlassian.jira.component.ComponentAccessor;
import com.atlassian.jira.issue.MutableIssue
import com.atlassian.jira.util.ErrorCollection;
import com.atlassian.jira.workflow.JiraWorkflow
import com.atlassian.jira.workflow.WorkflowManager
import com.onresolve.jira.groovy.canned.CannedScript;
import com.opensymphony.workflow.loader.ActionDescriptor

class TemporaryFl implements CannedScript

	Category log = Category.getInstance(TemporaryFl.class)
	public Map doScript(Map params)
		def String actionId = params[FIELD_TARGET_ISSUE_ACTION]
        actionId = actionId?.replaceAll(/ .*/, "")

        MutableIssue issue = params['issue'] as MutableIssue"params" + params)
        Boolean doIt = ConditionUtils.processCondition(params[ConditionUtils.FIELD_CONDITION] as String, issue, false, params)"field condition" + params[ConditionUtils.FIELD_CONDITION])"doIt" + doIt)
		Thread executorThread = new Thread(new Runnable() 
			void run() {
				doTransition(issue, params, actionId)

		if (doIt) 
			// possibly only need to do this on buggy versions of jira
			// doTransition(issue, params, actionId)
		{  "Condition wasn't true"

	private doTransition(MutableIssue issue, Map params, String actionId) 
		User user = WorkflowUtils.getUser(params)
		WorkflowUtils.actionIssue(params[FIELD_ADDITIONAL_SCRIPT] as String, issue, actionId as Integer, user, params)

	public ErrorCollection doValidate(Map<String, String> arg0, boolean arg1) 
		// TODO Auto-generated method stub
		return null;

	public List getCategories()

	public String getDescription()
		// TODO Auto-generated method stub
		return "Testing" ;

	public String getDescription(Map<String, String> arg0, boolean arg1)
		// TODO Auto-generated method stub
		return "Testing .."

	public String getName() 
		// TODO Auto-generated method stub
		return "Testing ..."

	public List getParameters(Map params)
                Type: "list",
                Values: getAllWorkflowActions(),
                Description: """ID of the workflow action that will be applied to this issue."""
                Label:"Additional code",
                Description: """Additional script to run before the issue is stored. Use this to modify fields
                    or add a comment etc.""",
                Examples: [
                    "Set comment (4.1 and above)": "issueInputParameters.setComment(\\'Some comment\\')",
                    "Set assignee (4.1 and above)" : "issueInputParameters.setAssigneeId(\\'someuser\\')",
                    "Set comment (4.0 and below)": "workflowTransitionUtil.setParams([\\'comment\\': \\'Some comment\\'])",
                    "Set assignee (4.0 and below)" : "issue.setAssigneeId(\\'someuser\\')",
	public static Map getAllWorkflowActions()
	  Map<String,String> rt = new LinkedHashMap<String,String>()
	  Map actions = new HashMap()
	  WorkflowManager workflowManager = ComponentAccessor.getWorkflowManager()
	  workflowManager.getWorkflows().each {JiraWorkflow workflow ->

					workflow.getAllActions().each {ActionDescriptor ad ->
						String v = "${} ($"
						if (! rt.values().contains(v)) {
							rt.put("$ ${}", v)
				rt.sort {it.value}
	public Boolean isFinalParamsPage(Map<String, String> arg0) {
		// TODO Auto-generated method stub
		return null;


when i run this script i get this error in the log file. Can anyone please me out to figure what is going wrong.

groovy.lang.MissingMethodException: No signature of method: static com.onresolve.jira.groovy.canned.workflow.postfunctions.ConditionUtils.setupBinding() is applicable for argument types: (com.atlassian.jira.issue.IssueImpl, java.util.HashMap) values: [JIRA-225, [args:[, ...], ...]]
Possible solutions: setupBinding(com.atlassian.jira.issue.MutableIssue, com.atlassian.crowd.embedded.api.User), setupBinding(com.atlassian.jira.issue.MutableIssue, java.util.Map, com.atlassian.crowd.embedded.api.User)
	at groovy.lang.MetaClassImpl.invokeStaticMissingMethod(
	at groovy.lang.MetaClassImpl.invokeStaticMethod(
	at org.codehaus.groovy.runtime.callsite.StaticMetaClassSite.callStatic(
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(
	at com.onresolve.jira.groovy.canned.workflow.postfunctions.ConditionUtils.processCondition(ConditionUtils.groovy:77)  <+3> ( (
	at java.lang.reflect.Method.invoke(
	at org.codehaus.groovy.reflection.CachedMethod.invoke(
	at groovy.lang.MetaMethod.doMethodInvoke(
	at org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite.invoke(
	at com.onresolve.jira.groovy.canned.workflow.postfunctions.TemporaryFl.doScript(TemporaryFl.groovy:36)
	at com.onresolve.jira.groovy.canned.CannedScript$ Source)
	at com.onresolve.jira.groovy.CannedScriptRunner.runCannedScript(CannedScriptRunner.groovy:63)
	at com.onresolve.jira.groovy.GroovyFunctionPlugin.execute(
	at com.opensymphony.workflow.AbstractWorkflow.executeFunction(
	at com.opensymphony.workflow.AbstractWorkflow.transitionWorkflow(
	at com.opensymphony.workflow.AbstractWorkflow.doAction(
	at com.atlassian.jira.workflow.OSWorkflowManager.doWorkflowActionInsideTxn(
	at com.atlassian.jira.workflow.OSWorkflowManager.doWorkflowAction(
	at com.atlassian.jira.bc.issue.DefaultIssueService.transition(
	at com.atlassian.jira.web.action.workflow.SimpleWorkflowAction.doExecute(  <+1> (
	at com.atlassian.jira.action.JiraActionSupport.execute(  <+7> ( ( ( ( ( ( (
	at javax.servlet.http.HttpServlet.service(  <+14> ( ( ( ( ( ( ( ( ( ( ( ( ( (
	at com.atlassian.labs.botkiller.BotKillerFilter.doFilter(  <+3> ( ( (
	at com.atlassian.jira.tzdetect.IncludeResourcesFilter.doFilter(  <+3> ( ( (
	at com.atlassian.jira.baseurl.IncludeResourcesFilter.doFilter(  <+8> ( ( ( ( ( ( ( (
	at com.atlassian.mywork.client.filter.ServingRequestsFilter.doFilter(  <+20> ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( (
	at com.atlassian.labs.remoteapps.modules.permissions.ApiScopingFilter.doFilter(  <+41> ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( (
	at com.atlassian.labs.remoteapps.modules.oauth.OAuth2LOFilter.doFilter(  <+3> ( ( (
	at com.atlassian.labs.remoteapps.util.http.bigpipe.RequestIdSettingFilter.doFilter(  <+43> ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( (
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(
	at java.util.concurrent.ThreadPoolExecutor$

2 answers

0 votes

Helps if you tell us what the errors are. Without that, you're asking us to debug code from scratch, and that's just a pain in the neck because we're repeating all the debugging you should have done already.

i am getting missing method exception: no signature of the method for ConditionUtils.setupBinding().

i have already listed out the error as given in the log file. The reason i have posted the code is to highlight the changes i have done to the file

Your error messages were not posted as part of your original question, which is why I asked.

The error is pointing to you trying to pass in an object/parameter that isn't acceptable to the function you're calling. It's hard to tell which because there's not enough log to know where you're doing it, but I'd tentatively say it's in the doTransition call.

Ok i didnt know that the error message wasnt available. By looking at the log i did get to know that its ConditionUtils.setupBinding(). of the CannedScriptUtils.groovy file. But even though writing the same code as available in the scriptrunner jar , i dont know why is it saying the parameters passed to it isnt matching.

Are you sure you have extracted the correct version of the source?

You would be better off subclassing my class, rather than copying and pasting and setting yourself up for a merge when you upgrade.

The other thing you should have done is just made the single change of changing the class name and checking that worked. Start with a "known good" that you can always revert to.

Thanks Jamie. I did the way you explained and i could resolve the issue. Just one more thing to add. The additional script part doesnt work even if we set. I have attached the screenshot for the configuration. But when i do the tranistion and check in the comment section of the issue i cant see any additional comment being logged there. This is 2.0 version of groovyrunner.

Can anyone please tel me if i am doing anything wrong in setting the additional code? After adding the additional code for eg. comments. I cant see it being added

Check your logs. I don't know what version of jira you have. Does that same additional code work with the unmodified version of fast-track?

no Jamie its not working.i am using the existing fast track transition script. Also no logs are being recorded.

The problem is that its working in our production system. But in my standalone jira application this doednot work.

I have the same JIRA and script versions at both the ends. JIRA - 5.2.5 & Scriptrunner - 2.1.15

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Feb 07, 2019 in Marketplace Apps

A Timeless Love Story

It started as any story starts, on a normal, rainy day.   Admin meets App, and her name was Klok2, and like any first relationship we were both trying to make it work but neither one knew what...

441 views 8 26
Read article

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