Update string custom field with Cloud Script Runner

Pavel Antonenko December 20, 2016

I need to update a custom field with Cloud Script Runner postfunction

issueInput.update.customfield_13300 = [[set: [value: 'test']]]

issueInput.update.customfield_13300 = 'test'

 This both expressions don't work.

Thanks!

 

1 answer

1 accepted

3 votes
Answer accepted
Jon Bevan [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 20, 2016

The simplest way to set a custom field is like this:

issueInput.fields.customfield_13300 = 'test'
Pavel Antonenko December 20, 2016

Thanks, I tried issueInput.update.customfield_10107 = 'test', but I see now the difference.

Jon Bevan [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 20, 2016

No problem - the documentation isn't very clear, but if you use the update property you have to specify an action like set:

issueInput.update.customfield_13330 = [[set: 'test']]
Pavel Antonenko December 20, 2016

Thanks, gotcha!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events