Syncing a custom field to a standard

Originally asked by Denis Gyachev on 29 December 2020 (original question)


we’re having troubles linking a custom field to a standard, just can’t seem to get the groovy syntax right across the incoming and outgoing processors. Is there a best practice/documentation that can help us?
We’re trying to sync up a standard description field to a custom multi-line text field.

Something like:

replica.description = issue.customFields.“Custom Description”?.value - but can’t get this part right, do we copy field object, value into value, something else?


Answer by Francis Martens (Exalate) on 08 January 2021

Hi Denis Gyachev

Exalate is passing messages between the two end points.
With the outgoing sync processor on one end of the connection you specify what information goes into a message, and in the incoming sync processor on the other end, you specify how that information needs to be applied.

So for your description use case you will have to add in the outgoing sync

Outgoing sync - source side

replica.description = issue.customFields."Custom Description"?.value

In the incoming sync on the target you will apply it to the issue

Incoming sync - target side

issue.description = replica.description

Note also - you can use any field name in the replica.

so you could do

replica.details = issue.customFields."Custom Description"?.value

and

issue.description = replica.details