Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to impersonate comments when synchronizing between two instances

Two teams are working on their own JIRA to track the development of a common product.  They agreed to synchronise all issues between the two instances.  One of the challenges encountered was that the comments made on one instance, should be also made on the local instance, and the way around.

As both instances have a completely different user base, there is a need to be able to lookup the local user based on the email address of the remote user such that comments can be created with the mapped local user.

 

There are multiple issue sync solutions on the market (check here), and the question is how does each of these solve this problem ?

 

 

2 answers

13 votes

I compared how three of the issue sync solutions with the most active installations handle this situation. In my opinion, the most important part is that people want to know which person commented on the issue on the remote issue. This can be solved by either creating a comment with this real user (user impersonation) or by commenting with a technical user and including the user information into the actual comment (comment enrichment).

Here are the results of my analysis:

  • Exalate
    • Comment Enrichment
      By default, Exalate adds a prefix with the comment author. I guess you could modify the script in order to adapt it to your needs.
      exalate-enrichment.png
    • User impersonation
      Creating the comment as the actual user is supported by providing a script as Francis mentioned. Unfortunately I could not get it running myself. @Francis Martens (iDalko) - can you check the script again?
  • Issue SYNC - Synchronization for JIRA
    • Comment Enrichment
      This addon also adds a prefix to every comment.
      intenso-enrichment.png
    • External Comments tab
      Alternatively, you can activate the external comments tab. Then only comments added in the external comments tab will be synchronized (see the documentation). If the user exists, it will be highlighted (see Administrator), if it does not exist, the name of the user is just being added as usual text.
      intenso-external-comments.png
  • Backbone Issue Sync for JIRA
    • Anonymous
      No user information will be added to the comment.
    • Comment Enrichment
      Backbone will add an enrichment text which you configured in the UI, by default.
      backbone-enrichment.png
      The documentation contains more information how to configure it.

 

If you know how the other sync solutions handle these cases, please comment here, and I am happy to edit my answer.

Hi Mathias,  

I do agree that in most cases, knowing who added the comment is sufficient.

Comment impersonation, and the ability to create users on the fly is required for business cases which need project mirroring or migration scenarios where you need to move issues from one instance to another.

If you have the time to detail out the problems that you encounter with the script, we are happy to help out.  Just send whatever information to support@exalate.com

Francis

 

 

 

Exalate allows to create and impersonate users with a very straightforward script

 

issue.comments = commentHelper.mergeComments(issue, replica, {  comment ->
   
  def author = userHelper.getByKey(comment.author.username)
   
  // set the executor, optionally create the user is the local user is not found
  comment.executor = author ?: userHelper.createUser (comment.author.username,
                                                     "changeme", //password !
                                                     comment.author.email,
                                                     comment.author.displayName
                                                    )
  comment
   
})

 

 

Check for more information How to impersonate a comment

 

Francis

Looks like that feature will use up one of your user licenses, right?

Depends on the version and the global permissions of the target instance (where the comment is being delivered)


What combination are you looking for ?

 

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Marketplace Apps & Integrations

Happy New Year and Welcome New Marketplace Partner Program Partners!

Happy New Year! We hope you all had a safe and restful holiday season. 2020 was a unique year full of unforeseen events; however, as we enter the new year of 2021, we’re optimistic for the light at t...

641 views 7 23
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you