unable to update custom field via fast track transition grovy script

R June 1, 2015

Hi,

I am trying to update approved? field as a additional condition using fast track transition. Below is my additional code script but it is not working.

def cf = customFieldManager.getCustomFieldObjects(issue).find {it.name == 'Approved?'}
issue.setCustomFieldValue(cf, "Approved")

 

I did tried below but no luck.

def cf = customFieldManager.getCustomFieldObject(10300)

issue.setCustomFieldValue(cf, "Approved")

 

Please assist us.

2 answers

0 votes
R June 29, 2015

Hi,

Thanks for getting back. Unfortunately it is still not working. Is there a way to use REST API to update the field?

0 votes
RVal
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.
June 1, 2015

First variant looks good to me provided you used correct custom field name.

Try adding issue.store() at the end

Suggest an answer

Log in or Sign up to answer