After upgrading from v 3.1.3 to 4.1.3.24 script gives error:
/rest/com.onresolve.jira.plugin.Behaviours/1.0/behaviours/runvalidator.json [onresolve.jira.behaviours.BehaviourManagerImpl] Script function failed on issue: issue: PYR-63667, user: viktork, fieldId: components, file: com/amayasoftware/scriptrunner/project/pyr/behaviours/PyrAllIssueTypesSetTeamsBehaviour.groovy
groovy.lang.MissingMethodException: No signature of method: static java.lang.Long.parseLong() is applicable for argument types: (java.lang.Long) values: [10710]
Possible solutions: parseLong(java.lang.String), parseLong(java.lang.String, int)
at com.onresolve.jira.groovy.user.FormField$_getValue_closure3.doCall(FormField.groovy:223)
at com.onresolve.jira.groovy.user.FormField.getValue(FormField.groovy:221)
at com.amayasoftware.scriptrunner.project.pyr.behaviours.PyrAllIssueTypesSetTeamsBehaviour$_SetEstimateWarning_closure3.doCall(PyrAllIssueTypesSetTeamsBehaviour.groovy:72)
at com.amayasoftware.scriptrunner.project.pyr.behaviours.PyrAllIssueTypesSetTeamsBehaviour.SetEstimateWarning(PyrAllIssueTypesSetTeamsBehaviour.groovy:70)
at com.amayasoftware.scriptrunner.project.pyr.behaviours.PyrAllIssueTypesSetTeamsBehaviour$SetEstimateWarning.callCurrent(Unknown Source)
at com.amayasoftware.scriptrunner.project.pyr.behaviours.PyrAllIssueTypesSetTeamsBehaviour.Behave(PyrAllIssueTypesSetTeamsBehaviour.groovy:149)
I do it like this:
def componentsIds = newComponentsFormFieldValues.collect{component -> component.id}
log.debug " Value " + componentsIds (output is Value2 [12632, 12639, 10710])
componentsFormField.setFormValue(newComponentsFormFieldValues)
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.