How to sync custom Date fields between 2 different jira servers

Originally asked by Adam Chin on 09 June 2020 (original question)


I’ve been referring to this documentation to update a custom Date Field between my 2 jira servers.

However I can’t seem to sync the date as whenever I try to exalate the issue, it doesn’t get updated on the opposing side.

I’m currently using this for incoming sync for both sides:
replica.customFields.“Contract Start Date” = issue.customFields.“Contract Start Date”

and outgoing sync for both sides:
issue.customFields.“Contract Start Date”.value = replica.customFields.“Contract Start Date”.value

Would I still need to change the date processor as its between 2 jira servers. I’ve linked the documentation below.
https://docs.idalko.com/exalate/pages/viewpage.action?pageId\=36766017
Source: Jira Server/Datacenter (old community)


Comments:

Juan Grases commented on 09 June 2020

Looks that there was a bug in the documentation, mixing the outgoing and incoming. Actually what you have in the incoming should go in the outgoing (and the other way around). Let me know.

Adam Chin commented on 16 June 2020

Juan Grases
Thanks for the help, However I still seem to be getting an error.

Answer by Roman on 22 June 2020

heyAdam Chin . You have a null pointer exception on row 29 in your script. We had a similar discussion here: Cannot get property ‘value’ on null object (old community) . Can you if there is a value in that custom field and f the names or id’s of these fields are entered correctly