Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Cant set value for FormField from scriptrunner v4.1.3.24

Viktor Kuzmychov
Contributor
February 1, 2018

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)

1 answer

Suggest an answer

Log in or Sign up to answer
0 votes
Viktor Kuzmychov
Contributor
February 2, 2018

Anyone? Any ideas? 

TAGS
AUG Leaders

Atlassian Community Events