1
0
-1
How to add a text string in front of the synced comment from JIRA to Zendesk side in order to identify the name of the updater in JIRA.
    CommentAdd your comment...

    1 answer

    1.  
      2
      1
      0

      Hi!

      You can do something like:

      replica.addedComments = replica.addedComments.collect{ c ->
      	def remoteAuthor = c.author.username
      	c.body = "Comment from "+remoteAuthor+" in Jira:\n "+c.body
      	c
      }
      issue.comments     += replica.addedComments
      
      1. Mikael Bohlin

        Hi,


        thank you for feedback. Unfortunatly the "author" was not synced. I assume this is setup on the incomming side on Zendesk ?

      2. Juan Grases

        Could you clarify on "the author was not synced"? You mean that the comment from Jira, was created in zendesk with the text "Comment from null in Jira:\n "+c.body ?

      3. Mikael Bohlin

        Yes , correct we received null  from c.author.username in Zendesk.


        How to fix ?



      4. Juan Grases

        It seems username is not available on Jira Cloud due GDPR limitations, you can use email instead:


        replica.addedComments = replica.addedComments.collect{ c ->
        	def remoteAuthor = c.author.email
        	c.body = "Comment from "+remoteAuthor+" in Jira:\n "+c.body
        	c
        }
        issue.comments     += replica.addedComments
      5. Mikael Bohlin

        OK, that worked,


        do  you have a list of  "variables" that we can use ?


        Regards

        Mikael

      6. Juan Grases

        Could you create that as a separate question (smile) ?

        Thanks!

        Juan

      CommentAdd your comment...