Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Cant set value for FormField from scriptrunner v4.1.3.24

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

Anyone? Any ideas? 

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Trello

🏊‍♀️ Atlympic Event: Trello

Hello Community!  Quick disclaimer: We are running a contest on Community (The Atlympics!) from July 23rd - August 8th of 2021. If you are interested in participating in this contest (prizes! ...

152 views 2 12
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you