I have a custom field of the type 'numeric'. I want to update this field within an automation rule using a scriptrunner script. I tried the following code, but it did not work...
def customFieldManager = ComponentAccessor.getCustomFieldManager()
def customfield = customFieldManager.getCustomFieldObject("customfield_56003")
issue.setCustomFieldValue(customfield, "new value")
Any suggestions?
Hi @Jelmer Tiemessen , if your CF is of Numeric type, you need to use value of java.lang.Double type (https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html)
I think the code itself just does not work. Also text fields won't get updated using this code...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Your answer saved me @Martin Bayer _MoroSystems_ s_r_o__
I had a hard time finding out a Double is needed :-)
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.