script-runner set num ber field

William JUTEAU February 5, 2014

Hello,

I use script runner to create subtask on transition, with additional issues actions like following :

def cf = customFieldManager.getCustomFieldObjects(issue).find {it.name == 'Number of users involved'}
issue.setCustomFieldValue(cf,'1')

I can't make it work.

'Number of users involved' is a number field.

Can somebody help me to figure this out ?

Thanks

1 answer

1 accepted

0 votes
Answer accepted
Henning Tietgens
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.
February 5, 2014

Number fields need Doubles as objects. So try

issue.setCustomFieldValue(cf,1 as Double)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events