1
0
-1

I’ve been trying to get User Picker (single user) syncing successfully between two instances of Jira, and Jira Service Desk. This is a User Picker field, and both instances have the exact same users on each, and the same custom field 'Responsible Guild'. Please see below for incoming/outgoing scripts:


Outgoing (JSM):

replica.customFields."Responsible Guild" = issue.customFields."Responsible Guild"


Incoming (Jira):

issue.customFields."Responsible Guild".value = replica.customFields."Responsible Guild"?.value.username


When this is run, we get an error on the incoming script ‘Cannot get property 'username' on null object’ and it cites this line:


issue.customFields."Responsible Guild".value = replica.customFields."Responsible Guild"?.value.username


Unsure on where I'm going wrong, or what I need to do to get this working.

    CommentAdd your comment...

    2 answers

    1.  
      1
      0
      -1

      Hi Andrii,


      Thanks very much for your response, this worked perfectly!

      Much appreciated.


      Kind regards,


      Sam

        CommentAdd your comment...
      1.  
        1
        0
        -1

        Hi Samuel Carter ,


        Thank you for posting this question here.

        Actually, accordingly to the following documentation article, I would suggest trying the following snippet:

        issue.customFields."Responsible Guild".value = nodeHelper.getUserByFullName(replica.customFields."Responsible Guild".value.displayName)
        
        

        Could you please try this out and get back to us with any outcome?

        Kind Regards,
        Andrii


          CommentAdd your comment...