Uploaded image for project: 'Jira Service Management Data Center'
  1. Jira Service Management Data Center
  2. JSDSERVER-5599

Comments not marked as internal when dispatchEvent boolean param is set to false

      This is affecting the SAC migration to Automation for JIRA (talk to Shane Frensley for more details).

      The problem is that comments added to servicedesk issues never get marked with INTERNAL, even if the comment property 'sd.public.comment' is correctly supplied with

      {"key":"sd.public.comment","value":{"internal":true}}

      .

      The problem is that when you call JIRA's

      commentService.create(loggedInUser, commentResult, false);

      then the comment will not be marked as 'INTERNAL' even if the comment property was set correctly.

      The specific problem here is the third param false (which stops this from dispatching an event/notification). If it's set to true then the comment is marked as INTERNAL.

      For full details I can give you access to https://codebarrel.atlassian.net/servicedesk/customer/portal/1/CBS-1288 or speak to Shane.

          Form Name

            [JSDSERVER-5599] Comments not marked as internal when dispatchEvent boolean param is set to false

            tk1444722874

            Looking in Adaptavist documentation for Scriptrunner recommend to use a internal implementation from JSM (former JSD) ServiceDeskCommentService object to create the comment instead of using CommentManager entity. 

            https://library.adaptavist.com/entity/create-a-comment-on-a-jira-service-desk-ticket-in-groovy

            The example is very straightforward and might help you

            Italo Qualisoni [e-Core] added a comment - tk1444722874 Looking in Adaptavist documentation for Scriptrunner recommend to use a internal implementation from JSM (former JSD) ServiceDeskCommentService object to create the comment instead of using CommentManager entity.  https://library.adaptavist.com/entity/create-a-comment-on-a-jira-service-desk-ticket-in-groovy The example is very straightforward and might help you

            Kirill Timofeev added a comment - - edited

            Hello from 2020!

            I wanted to create a public comment when user without agent right call my REST API, but it is impossible. When I set "dispatchEvent = true" - created comments have an "internal" status. But, if the API caller user have an agent rights - comment created in "public" status. Had to abandon the "dispatchEvent = true". There is part of code:

            JSONObject json = new JSONObject();
            json.put("internal", false);
            
            Map<String, JSONObject> properties = new HashMap<>();
            properties.put("sd.public.comment", json);
            // Использую dispatchEvent = false из-за бага: https://jira.atlassian.com/browse/JSDSERVER-5599
            commentManager.create(issue, user, commentText, null, null, new Date(), properties, false);
            

            Jira SD version: 4.13.1

            Kirill Timofeev added a comment - - edited Hello from 2020! I wanted to create a public comment when user without agent right call my REST API, but it is impossible. When I set "dispatchEvent = true" - created comments have an "internal" status. But, if the API caller user have an agent rights - comment created in "public" status. Had to abandon the "dispatchEvent = true". There is part of code: JSONObject json = new JSONObject(); json.put( "internal" , false ); Map< String , JSONObject> properties = new HashMap<>(); properties.put( "sd. public .comment" , json); // Использую dispatchEvent = false из-за бага: https://jira.atlassian.com/browse/JSDSERVER-5599 commentManager.create(issue, user, commentText, null , null , new Date(), properties, false ); Jira SD version: 4.13.1

            Is there any updated status on the same?? Because we are also facing same issue in JIRA Service Desk 4.2.3. 

            Kalyan Kumar Das added a comment - Is there any updated status on the same?? Because we are also facing same issue in JIRA Service Desk   4.2.3.  

            +1

            +1

            mattgosnell added a comment - +1

            +1

            +1

            Adam Panes added a comment - +1

            I have the same problem as Jeanne Scilley.

            Krzysztof Krajewski added a comment - I have the same problem as Jeanne Scilley.

            If I could vote for this issue, I would. 

            We use the Automation add on to close tickets after they have been in a status of resolved for X days.  We include a comment to the ticket as part of this automation for historical reference stating that it was "auto-closed" and we do not want this comment to be shared with the reporter/end user.

            Jeanne Scilley added a comment - If I could vote for this issue, I would.  We use the Automation add on to close tickets after they have been in a status of resolved for X days.  We include a comment to the ticket as part of this automation for historical reference stating that it was "auto-closed" and we do not want this comment to be shared with the reporter/end user.

            Ricardo da Silva added a comment - - edited

            This issues affects also version 4.0

            Ricardo da Silva added a comment - - edited This issues affects also version 4.0

              bornatowski Bartosz Ornatowski
              mknicely Morgan Knicely (Inactive)
              Affected customers:
              66 This affects my team
              Watchers:
              46 Start watching this issue

                Created:
                Updated:
                Resolved: