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

This widget could not be displayed.

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
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

225 views 3 0
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