Hi Team,
I have one urgent requirement,
we have two fields called Impacting and Probability.
and we have one more field called rating. all these are number fields.
requirement is when ever issue is created for issue type task we have to populate values of Impacting and Probability and rating should populate automatically as Impacting * Probability.
I created script filed with the Below script
def number1 = getCustomFieldValue("Impacting")
// You can pass in Custom Field ID too!
def number2 = getCustomFieldValue("Probability")
// If the field is empty, set the value as 0
if (!number1){
number1 = 0
}
if (!number2) {
number2 = 0
}
return number1 * number2 .
This is working fine for another user but for me it's showing error like
org.codehaus.groovy.runtime.InvokerInvocationException: groovy.lang.MissingMethodException: No signature of method: Script1.getCustomFieldValue() is applicable for argument types: (String) values: [Impacting] at TestScriptedFieldExecution1_groovyProxy.run(Unknown Source) Caused by: groovy.lang.MissingMethodException: No signature of method: Script1.getCustomFieldValue() is applicable for argument types: (String) values: [Impacting] at Script1.run(Script1.groovy:1) at Script1$run.call(Unknown Source) at com.adaptavist.sr.cloud.workflow.AbstractScript.evaluate(AbstractScript.groovy:33) at com.adaptavist.sr.cloud.events.ScriptedFieldExecution.run(ScriptedFieldExecution.groovy:30) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at TestScriptedFieldExecution1_groovyProxy.run(Unknown Source) at com.adaptavist.sr.cloud.MainHandler.executeScript(MainHandler.groovy:409) at com.adaptavist.sr.cloud.MainHandler.processInput(MainHandler.groovy:355) at com.adaptavist.sr.cloud.MainHandler.access$0(MainHandler.groovy) at com.adaptavist.sr.cloud.MainHandler$_handleRequest_closure1.doCall(MainHandler.groovy:171) at com.adaptavist.sr.cloud.MainHandler$_handleRequest_closure1.call(MainHandler.groovy)
Can some one please explain how can i achieve this trough script runner ?