Questions for Confluence license has expired.

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

Issue adding comments and internal; internal comments appear in customer portal

 
1
0
-1

I feel like this is a simple syntax error or something on my part, but I'm not receiving an error. I have two projects: TMSServiceDesk and TMS. I want all comments that sync from TMS to TMSServiceDesk to sync as internal so that the engineering comments do not appear in the customer portal. I'd like ALL comments from the TMSServiceDesk instance to be visible in the TMS instance. 


With the current script below, the comments are synching, but all comments are coming in as External in the TMSServiceDesk instance and are visible to the customer in the customer portal.


I am using a visual connection with script. Here are the two script mappings I have:

if (executionInstanceName == "TMSServiceDesk")
 issue.comments  = commentHelper.mergeComments(
           issue, replica, {it.internal = true; it} { 
               comment ->
                 comment.body =  "|https://wenergysoftware.atlassian.net/browse/"+replica.key+", "+ comment.author.displayName +  " commented: \n" +comment.body
   }
)


if (executionInstanceName == "TMS")
 issue.comments  = commentHelper.mergeComments(
           issue, replica,  { 
               comment ->
                 comment.body =  "|https://wenergysoftware.atlassian.net/browse/"+replica.key+", "+ comment.author.displayName +  " commented: \n" +comment.body
   }
)

    CommentAdd your comment...

    2 answers

    1.  
      1
      0
      -1

      Can you check that the customer request type is set at creation time of the issue
      The JSM Rest API will make all comments public if this is not the case.

      Check also
      https://docs.idalko.com/exalate/display/ED/Jira+Cloud%3A+How+to+sync+Customer+request+type+field+in+Jira+Service+Desk

      1. Destri Weir

        So this is definitely what's going on, but I can't get the script in the link above to bring over the Request type. I made sure that Request type field was on the Jira instance Create screens. I am not getting an error but the request type is not being populated on the Jira side (but is populated on the the Service Desk side). 


        Here is the script I am using (Visual connection with script where TMS is the Jira side instance):

        if (executionInstanceName == "TMS") {
          issue.projectKey = "TMS" //Included only on create processor

        issue.customFields."Request Type".value =  replica.customFields."Request Type"?.value
        }



      2. Destri Weir

        I also tried setting it with a fixed value, but that also doesn't work. I don't see any way to populate the Request type in Jira software (it's a locked system column from Service Desk), and if I try to select an option in Jira software, I get an error (there are no options as there are in Service Desk). 


        I've mapped the issue type, so I don't know what I'm doing wrong. 


      3. Destri Weir

        I'm mapping using the exact logic here: https://docs.idalko.com/exalate/display/ED/Setting+the+request+type+using+the+visual+editor


        And the request type is still not coming over to the Jira software side. Any ideas what could be going on? It's Jira Cloud, so I'm not sure how to debug. 

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

      Issue was resolved with a syntax change (actually grouping two comment script snippets separately and in reverse order). 

        CommentAdd your comment...