we have a problem with the synchronization between two custom fields from the remote instance to our local. One field is a single line text field, the other a select list (single choice). In both instances, the value of the remote fields aren’t synchronized to our local issues or more specifically are only returning “null” values (when trying to print the value to the log).
The problem of not receiving the value of a specific custom field also appears in another connection with the same custom text field on the remote side. As this other project resides in our Jira Software instance, I attached the support zip from this one.
The fields we are trying to sync are named as followed:
Have you inspected the payload (remote replica) on the receiving instance to see what you are receiving. This will help narrow down the problem to the “sending” or “receiving” side. Please also share the scripts you are using to accomplish this.
@Majid I inspected the payload we are receiving from the replica. I can confirm that we are receiving the value from this field, but somehow aren’t able map it to a text field or print it to the logs.
we now have tried this approach, but had to swap the IDs of the custom fields because “12820” is the field on our instance. We are trying to get the value from the custom field with the ID “10087” on the remote instance.
When we then triggered an update from the remote instance, we received the error “Cannot get property ‘value’ on null object” from that line. However, when inspecting the remote issue tab as well as the remote payload, the value is visible.
if I understand correctly, this must be the part you are looking for: "customFields": { "12820": { "id": 10087, "name": "Kundenreferenz", "uid": "10087", "type": "STRING", "value": "MAKS-575" }
(The value changed because I took the payload of another issue)
Ok, so this looks like the correct remote payload and the field name in replica is 12820.
That means you are definitely sending 12820 from the remote side.
So, this line should still work on your side:
issue.customFields.“XYZ”.value = replica.customFields.“12820”.value
it’s working now. I found the solution in the provided video.
I didn’t know that the left side ID of the outgoing script needs to match with the right side ID of the incoming script. Also that, in the outgoing script, it didn’t need to be the field we are using on the local instance.