Originally asked by Jonathan Gilbert on 04 February 2021 (original question)
Morning, I am trying to push the display value of the “assignee” in Jira to a String field in Servicenow. I have tried to do the simple mapping, but all that did was to display the key.
OUTGOING JIRA
replica.assignee = issue.assignee
INCOMING SERVICENOW
entity.u_assigned_to_in_jira = replica.assignee
I have then found a community post from Francis that advises the following code (which I have updated for my instance)
But this only populates the sys_id of the user in the field, rather than the name.
Ideally I would like just the simple display value pushing from Jira, as we may have the situation that some Jira users are not listed in ServiceNow, so the 2nd solution would not work
In this case where you only want the displayName of the Jira assignee to show as text in the u_assigned_to_in_jira field, you don’t need to use the helper method “nodeHelper.getUserByEmail” because you don’t need to find a local user, you just want the displayName of the remote user as text, so the following line should suffice for this use case: