1
0
-1

I am trying to sync fields between SN and Jira, and it is just seemingly impossible.  Here are the fields we are looking to sync, SN on the left, Jira on the right.

requested_forReporter
assigned_to<> Assigned To
watch_listWatcher


It gets a little more complex since one of the issue types we are trying to sync from in Service Now is catalog task, so that definitely messes with the field name there, but in any case, we are getting nothing but errors. 


Has anyone cracked this problem yet?  I can't even seem to get information to leave SN without an error.  For example:


Error Detail Message:
Cannot cast object '{display_value=John Doe (JDOE), link=https://client.service-now.com/api/now/v2/table/sys_user/68cea2c52c4c32c0c8e2a692842efa26}' with class 'scala.collection.convert.Wrappers$MapWrapper' to class 'com.exalate.api.domain.hubobject.v1_2.IHubUser' due to: groovy.lang.GroovyRuntimeException: Could not find matching constructor for: com.exalate.api.domain.hubobject.v1_2.IHubUser(scala.collection.convert.Wrappers$MapWrapper)


Is there documentation which clearly states how to sync user data between these two issue trackers?

  1. Serhiy Onyshchenko

    Hello, Robert Horan
    Thanks for raising this question in community
    In order to assign / set reporter to a user on Jira Cloud, one has to get a reference to that user's account.
    Please, note down your current "incoming sync" script on Jira Cloud.

    Have you tried using:

    issue.reporter = nodeHelper.getUserByFullName( replica ... .display_value)

    For reference: https://docs.idalko.com/exalate/x/zYErAQ

    In case if it doesn't work, please send your current "Incoming sync" script so I could further suggest possible actions.

    UPDATE:
    the idea here is that you're currently assigning to an object which does not represent the user of Jira Cloud, but rather contains some info from ServiceNow:

    issue.reporter = replica ...

    But it needs to be converted into the proper Jira Cloud user via either of the methods

    Which expect different things to be passed from ServiceNow: the first one Expects that you get the full name (otherwise known as display_value from the error you'd shared earlier), while the latter expects that you'd fetch the user email in addition to all the other info currently sent and share that through the replica in the "outgoing sync" script on ServiceNow side.


    Please let me know if you have any questions on that
    Regards, Serhiy.

  2. Robert Horan

    Thank you, Serhiy! 

    I cannot guarantee the display name would be the same between systems, so in that case getUserByEmail would likely be the way to do that.  


    Two questions:

    1. Will this work in both directions?
    2. What happens when there is no match?  
CommentAdd your comment...