The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

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

Comments for this post are closed

Community moderators have prevented the ability to post new 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 Champions.
June 1, 2015

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

Try adding issue.store() at the end

TAGS
AUG Leaders

Atlassian Community Events