Originally asked by Pablo Serra on 26 August 2021 (original question)
Hi,
We have a connection between ZenDesk and JIRA and we are having some issues syncing the assignees. The assignee field on Jira is not taking the value from Zendesk but there’s no error on either Zendesk nor Jira.
Any documentation or tip on syncing user fields we’ll be greatly appreciated.
Regards,
Pablo
Comments:
Daniel Carvajal commented on 27 August 2021
Hi Pablo
For the users to map correctly both users need to exist on both instances with the same values.
In this case could you try to add the following script (instructions here: https://docs.idalko.com/exalate/x/ogXHAw)
Please keep in mind that you need to change the “remote_instance_shortname” (it will turn green if its the correct one). And also switch the “example@idalko.com” for the default user email that you wish to have set if no user is found.
if (executionInstanceName == "Remote instance name") {
def localAssignee = nodeHelper.getUserByEmail(replica.reporter?.email)
if(!localAssignee){
localAssignee = nodeHelper.getUserByEmail("example@idalko.com")
}
issue.assignee = localAssignee
}
Cheers,
Daniel
Pablo Serra commented on 27 August 2021
Hi Daniel,
Thx for your reply.
This script replaces the field mapping? Shoul I delete the mapping?
Also, when you say that both users must have the same value, do you mean same email? same user name or description?
Regards,
Pablo
Daniel Carvajal commented on 30 August 2021
Hi Pablo
Thats correct, the script replaces the field mapping, you may remove it.
And for value I meant the same email value, since its the one we are using to map the users.
Cheers,
Daniel
Pablo Serra commented on 21 September 2021
Hello Again.
We’ve tried the script. No luck, still not getting the user on Jira. Not even the default value:
if (executionInstanceName == "ualahq_to_jira-issues-uala") {
def localAssignee = nodeHelper.getUserByEmail(replica.reporter?.email)
if(!localAssignee){
localAssignee = nodeHelper.getUserByEmail("Diego Ariel Scocco")
}
issue.assignee = localAssignee
}
Please, let me know what you need to analyze the issue.
Regards, Pablo
Pablo Serra commented on 29 September 2021
Hello, any help on this we’ll be much appreciated. Thx.