1
0
-1

Hello,


I'm having an issue where the public comments are being sync'd as "Exalate" instead of the actual user of the comment.  I have made sure that the user exists in the companies.  Exalate support suggested I used scripts instead of the visual method.   I have attempted this however am still showing the commenter as Exalate.   Any help would be appreciated.

  1. Ariel Aguilar

    Hi there,

    You need to delete the comments mapping and just add the following script where A and B stand for your connection short name (For example, in this case connection name is A_to_B):

    if (executionInstanceName == "A") {
        replica.getClass().fields
        def locked = replica.getClass().declaredFields.find{it.name == "_locked"}
        locked.setAccessible(true)
        locked.set(replica, false)
        replica.addedComments.each { it.executor = nodeHelper.getUserByEmail(it.author?.email) }
        replica.changedComments.each { it.executor = nodeHelper.getUserByEmail(it.updateAuthor?.email) }
        issue.comments = commentHelper.mergeComments(issue, replica, { it }) 
    }
    
    if (executionInstanceName == "B") {
        replica.getClass().fields
        def locked = replica.getClass().declaredFields.find{it.name == "_locked"}
        locked.setAccessible(true)
        locked.set(replica, false)
        replica.addedComments.each { it.executor = nodeHelper.getUserByEmail(it.author?.email) }
        replica.changedComments.each { it.executor = nodeHelper.getUserByEmail(it.updateAuthor?.email) }
        issue.comments = commentHelper.mergeComments(issue, replica, { it })
    }

    Kind regards,

    Ariel

  2. David Loszewski

    This seems to have worked, I'll continue to monitor.    Thank you very much! 

  3. David Loszewski

    Looks to not be working still.   Still showing up as Exalate and not seeing any errors.   Here's the latest from the jcloudnode.log file, not sure if it helps:

    "issueKey":{"id":21694,"idStr":"21694","urn":"CTS-2113","entityType":"issue"}},"connectIssueUrn":null,"unexalateRemoteIssueUrn":null,"deletedRemoteIssueUrn":null,"syncedTo":{"id":13783,"idStr":"13783","urn":"CTS-2658","entityType":"issue"},"blobMetadataList":[],"twinTraceId":1592,"payed":false,"subscriptionContext":{"withNodeSubscription":true,"withExalateSubscription":false},"connectContext":null,"traces":[{"type":"COMMENT","localId":"35258","remoteId":"14008","action":"NONE","toSynchronize":true},{"type":"COMMENT","localId":"35259","remoteId":"14009","action":"NONE","toSynchronize":true},{"type":"COMMENT","localId":"35260","remoteId":"14010","action":"NONE","toSynchronize":true},{"type":"COMMENT","localId":"35261","remoteId":"14011","action":"NONE","toSynchronize":true}],"syncType":"UPDATE"}

  4. Ariel Aguilar

    Hi David,

    This post says you are referring to Jira Cloud, is this connection between 2 Jira Cloud and the user has the same email address on both instances?

    Kind regards,

    Ariel

  5. David Loszewski

    Hi Ariel Aguilar , yes, two Jira cloud instances, the user has the same email address on both instances. 

  6. Ariel Aguilar

    Could you verify the lines and it's spacing? I just made an adjustment to the code block above. It's important the lines are complete sentences and not to be separated.


  7. David Loszewski

    I copy and pasted from the code block above although I don't see any changes from what you previously posted.  

CommentAdd your comment...