1
0
-1

Only the comments beginning with #JIRA# should sync over to Jira from ZD.


    CommentAdd your comment...

    3 answers

    1.  
      2
      1
      0

      HI George Smith,


      I have worked on this case and ensured that the following is happening:

      • Only internal comments from ZD side are considered for sync
      • Only internal comments that contain the word #DEV# are sent to Jira. 


      In order to configure this, we need to ensure that we filter out the comments in the ZD outgoing script:

      Zendesk outgoing
      replica.comments  = issue.comments.findAll { 
          comment ->
          if (comment.internal)
              comment.body =~ /#DEV#(.*)/
      }

      You can definitely play around with the regular expression here to modify the selection. 


      On the Jira side, you can continue to use the standard line for comments handling in the Incoming script:

      Jira Incoming
      issue.comments     = commentHelper.mergeComments(issue, replica)


      Here is a short video demonstrating the scripts in action:


      Hope it helps!


      Thanks

      Majid




        CommentAdd your comment...
      1.  
        1
        0
        -1

        HI Kazim, 

        Can you change the Jira Incoming line to:

        issue.comments     = commentHelper.mergeComments(issue, replica, {
            comment ->
            comment.body = comment.body.substring(5)
            comment
        })


        and see if that resolves the issue.

        Thanks

        Majid


        1. Syed Majid Hassan

          Hi Kazim Yildirim ,

          Are you all set on this one please?

          Thanks

          Majid

        CommentAdd your comment...
      2.  
        1
        0
        -1

        This works fine for me.

        Thanks!


        PS: One topic to optimize...what to do, not to display the hashtag #DEV# on JIRA side?

          CommentAdd your comment...