Questions for Confluence license has expired.

Please purchase a new license to continue using Questions for Confluence.

Jira to Zendesk : Placeholders

 
1
0
-1

When a comment is synced from our Jira to Zendesk, it would be handy if we could use the Zendesk placeholders, such as: {{ticket.title}} 


When we try using those codes in a Jira comment, it reaches Zendesk as: \{\{ticket.title}}.


Is there a way our users can add the placeholders in a Jira comment and have Zendesk apply the value substations when a comment is synced?


Our Zendesk sync code for comments is:


issue.comments = commentHelper.mergeComments(issue, replica,                      
	{
		comment ->
		comment.body =
		comment.author.displayName +" commented on ${replica.key}: \n \n" +
		comment.body
	}


Thanks.

    CommentAdd your comment...

    1 answer

    1.  
      1
      0
      -1

      You could create your own placeholders and replace these in the incoming sync on the zendesk side.


      For instance if '{ticket.title}' needs to be replaced you can then have on the zendesk side

      issue.comments = commentHelper.mergeComments(issue, replica,                      {
      		comment ->
      
      
              def body = comment.body
              body = body.replace("{{ticket.title}}", issue.summary)
              body = body.replace("{{ticket.description}}", issue.description)
      
      		comment.body =
      		comment.author.displayName +" commented on ${replica.key}: \n \n" +
      		body
      	}
      1. Andrew Hogan

        Thanks Francis,


        Is there any way to pick up values that Jira doesn't have, such as {{ticket.requester.first_name}}

      CommentAdd your comment...