Copying one a custom field onto another while on the Issue Edit screen

rsud April 13, 2014

I need to copy the value of one of my custom fields on the Edit screen to another custom field. The workflow status will remain the same while doing this.

1 answer

1 vote
Boris Georgiev _Appfire_
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.
April 13, 2014
rsud April 13, 2014

Thanks. I do have this installed. I use this during transitions. Could you give me more information? I am trying to copy the value of CustomField1 to CustomField2 when CustomField1 is changed.

Boris Georgiev _Appfire_
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.
April 13, 2014
Boris Georgiev _Appfire_
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.
April 13, 2014

Here's a sample code (add it to customfield1)

FormField cf1 = getFieldById(fieldChanged) 
FormField cf2 = getFieldByName("CustomField2")

cf2.setFormValue(cf1.getValue())

Note that in the UI you'll not see immediate update of customfield2, but it will be updated if you click anywhere on the form or just click update to save the issue changes.

Suggest an answer

Log in or Sign up to answer