Sync system field to custom field

Originally asked by Vimalraj Rangasamy on 30 July 2020 (original question)


Hi,

May I know how to sync system field to custom field. I’m syncing from server instance to cloud and vice versa. I need to save key, reporter and status from other instance in my local instance. Please assist.


Answer by Juan Grases on 30 July 2020

Hi!

You can do that like this:

issue.customFields."CF Name".value = replica.key
//or
issue.customFields."CF Name".value = replica.status.name
//or
issue.customFields."CF Name".value = replica.reporter?.username //or email

Just make sure you are setting those values on the replica, on the outgoing script of the sending side (they are set by default). Also make sure to use the exact CF Name or the ID number (or also between quotes)

Best regards,

Juan


This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.