Groovy Clone issue script not working correctly

Currently, when trying to use the "Clone Issue and project" built-in script that comes with Jira out the box, I get the following error:2013-11-05 12:11:24,264 http-bio-8082-exec-18 ERROR ahawkins 731x23568x1 ykvqyg /secure/CommentAssignIssue.jspa [onresolve.jira.groovy.GroovyFunctionPlugin] Error executing post-functionjavax.script.ScriptException: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: issueInputParameters for class: Script19at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval( javax.script.AbstractScriptEngine.eval(Unknown Source)at javax.script.ScriptEngine$eval$ Source)at com.onresolve.jira.groovy.canned.utils.ConditionUtils.doAdditional(ConditionUtils.groovy:104)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)at java.lang.reflect.Method.invoke(Unknown Source)at org.codehaus.groovy.reflection.CachedMethod.invoke( groovy.lang.MetaMethod.doMethodInvoke( org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite.invoke( piece of Groovy code that I used to was the following in the "additional issue action" field:def cf = customFieldManager.getCustomFieldObjects(issue).find { == 'Deliverable'} issueInputParameters.addCustomFieldValue(, 'Characterization')where the custom field name is Deliverable and the value of that field needs to be set to Characterization.

1 answer

Seems like you are trying to set a custom field value after cloning the issue.

Try using this in the "Additional Code" part of the post function:

def cf = customFieldManager.getCustomFieldObjects(issue).find { == 'Deliverable'}

issue.setCustomFieldValue(cf, 'Characterization')

issueInputParameters doesn't always work.

Make sure the value you're setting matches the custom field type

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Jan 08, 2019 in Jira

How to Jira for designers

I’m a designer on the Jira team. For a long time, I’ve fielded questions from other designers about how they should be using Jira Software with their design team. I’ve also heard feedback from other ...

1,101 views 4 9
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