The Exalate team will be on holiday for the coming days - returning Jan 4
Enjoy & stay safe
1
0
-1
1 answer
- 210
Hi, Benjamin Kiene excellent question! I think I might have the solution.
What I did is on the outgoing sync of SNOW I ask for snow for the whole user object of the author for every comment. Then I add the email to the comment author. The code you can find here.replica.comments = entity.comments for(comment in replica.comments){ def user = nodeHelper.getUserByUsername(comment.author.displayName) comment.author.email = user.email } }
Which should result in:
Please let me know if it does or doesn't work.
Kind regards,
Michiel- Benjamin Kiene
Hi Michiel Meurs,
Thank you very much for your solution and I'm very sorry for the delay in my reply.
I've tested and used your suggested solution in my projects and it made everything work flawlessly and as expected now, thank you so much!
I really appreciate your quick and expert support despite my delayed reply!
Kind regards,
Benjamin
Add your comment...
I'm trying to impersonate the comments with help of the commentHelper.mergeComments() function on the JIRA side as provided in the default incoming script
Unfortunately, I found that the remote replica (coming from a ServiceNow instance) doesn't contain the email variable in the author array for one reason or another. (It seems like Exalate is not putting it in the replica when syncing out from ServiceNow, see example below)
I was wondering whether it is possible to do something like the below in the outgoing sync?
Or is there any other way to get Exalate to add the email of the comment author into the replica or is it ServiceNow that is determining what author details are saved in each comment and would need to be changed in the ServiceNow instance somewhere? If so, would you happen to know how and where it can be changed?
Hi Ben,
You could try to do in Jira Incoming the following instead:
Kind regards,
Ariel
Hi Ariel,
Thank you for your quick reply!
If I understand it correctly if I do it on the incoming sync the nodeHelper function queries the JIRA instance to get the user by username.
The problem with that is that the usernames in JIRA are not matching the usernames in SNOW, hence why we need to go through the email address (which do match).
But then Exalate is not putting the email address in the author section out of the box through the standard
instruction in the outgoing script in SNOW. That's why I'm wondering whether I could customize it to include the email address in there as well.
I'm open to alternative solutions, but unless I misunderstand something your suggestion would not work, no?
Thank you for your support and checking again!
Best regards,
Ben
Hi Ben,
We have a way to extract the email from: incident.caller:
Outgoing Snow:
Incoming Jira:
Let me know if this works for you.
Kind regards,
Ariel
Hi Ariel,
Thank you for your feedback!
Unfortunately, if I understand your suggested solution correctly, it would not help as all the comments would appear as being from the caller.
That's why I was wondering about the possibility to save the email address with the author details of each comment as each comment might be from a different author (e.g. different support agents) and not from the caller.
Any further ideas are appreciated!
Best regards,
Benjamin
Hi Ariel Aguilar, Saskia,
Are there any further updates?
Any idea how the email could be saved with the author on the ServiceNow side, so that I can access it on the Jira side?
Thank you for your kind help!
Best regards,
Benjamin