Syncing custom user fields between Zendesk and Jira can be tricky, especially when dealing with user objects and custom fields. Based on the Exalate documentation, here are some key points and suggestions to help you resolve your issue:
Syncing User Fields from Zendesk
To sync user fields like assignee, reporter, or creator from Zendesk, you should send the user object directly in your Zendesk Outgoing sync script:
For custom user fields, you can assign the custom field value (if it’s a user object) to a replica property.
Handling Custom User Fields
If your custom field in Zendesk is a user field, you should pass the user object (not just the name or ID) to the replica. For example:
If you need to fetch additional user details (like name) using the user ID, ensure the API call is correct and the result is properly assigned.
Jira Incoming Sync: Setting the User Field
On the Jira side, to set a custom user field, use the appropriate nodeHelper method. For example, if your custom field is of type “user”, you can do:
Make sure you are passing the user object (not just the name or ID) in the replica.
On the Jira side, use nodeHelper.getUserByEmail or similar methods to set the user field.
If your custom field is not of type “user” in Jira, you may need to adjust your approach.
If you follow the patterns in the documentation above, you should be able to sync your custom user field successfully. If you still encounter issues, double-check the field types and the data being passed in the replica.
The issue here is the field id itself, the scientific notation of the field needs to be used. You can remove the debug.error() to find the scientific notation of the field.