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

Comment return from REST API does not include Visibility for Service Desk Project

    • Icon: Suggestion Suggestion
    • Resolution: Answered
    • None
    • API and Integrations
    • None
    • We collect Jira Service Desk feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

      NOTE: This suggestion is for JIRA Service Desk Server. Using JIRA Service Desk Cloud? See the corresponding suggestion.

      Problem statement

      Internal comment and customer facing comment does not get separated when retrieving comment data via REST API

      Steps to reproduce

      1. Install Service Desk and use DESK project
      2. On DESK-1 issue, add a comment to the customer, and comment for Internal
      3. GET request to http://localhost:8080/rest/api/latest/issue/DESK-1/comment
      4. The following are the results on my testing
        {"startAt":0,"maxResults":2,"total":2,"comments":[{"self":"http://localhost:8080/rest/api/2/issue/10000/comment/10000","id":"10000","author":{"self":"http://localhost:8080/rest/api/2/user?username=admin","name":"admin","emailAddress":"admin@email","avatarUrls":{"48x48":"http://www.gravatar.com/avatar/2edb867fbee6e0cb054975ff1e4bcc8d?d=mm&s=48","24x24":"http://www.gravatar.com/avatar/2edb867fbee6e0cb054975ff1e4bcc8d?d=mm&s=24","16x16":"http://www.gravatar.com/avatar/2edb867fbee6e0cb054975ff1e4bcc8d?d=mm&s=16","32x32":"http://www.gravatar.com/avatar/2edb867fbee6e0cb054975ff1e4bcc8d?d=mm&s=32"},"displayName":"admin AWESOME","active":true},"body":"Testing to customer","updateAuthor":{"self":"http://localhost:8080/rest/api/2/user?username=admin","name":"admin","emailAddress":"admin@email","avatarUrls":{"48x48":"http://www.gravatar.com/avatar/2edb867fbee6e0cb054975ff1e4bcc8d?d=mm&s=48","24x24":"http://www.gravatar.com/avatar/2edb867fbee6e0cb054975ff1e4bcc8d?d=mm&s=24","16x16":"http://www.gravatar.com/avatar/2edb867fbee6e0cb054975ff1e4bcc8d?d=mm&s=16","32x32":"http://www.gravatar.com/avatar/2edb867fbee6e0cb054975ff1e4bcc8d?d=mm&s=32"},"displayName":"admin AWESOME","active":true},"created":"2014-12-12T22:12:58.263+0800","updated":"2014-12-12T22:12:58.263+0800"},{"self":"http://localhost:8080/rest/api/2/issue/10000/comment/10001","id":"10001","author":{"self":"http://localhost:8080/rest/api/2/user?username=admin","name":"admin","emailAddress":"admin@email","avatarUrls":{"48x48":"http://www.gravatar.com/avatar/2edb867fbee6e0cb054975ff1e4bcc8d?d=mm&s=48","24x24":"http://www.gravatar.com/avatar/2edb867fbee6e0cb054975ff1e4bcc8d?d=mm&s=24","16x16":"http://www.gravatar.com/avatar/2edb867fbee6e0cb054975ff1e4bcc8d?d=mm&s=16","32x32":"http://www.gravatar.com/avatar/2edb867fbee6e0cb054975ff1e4bcc8d?d=mm&s=32"},"displayName":"admin AWESOME","active":true},"body":"Testing internal","updateAuthor":{"self":"http://localhost:8080/rest/api/2/user?username=admin","name":"admin","emailAddress":"admin@email","avatarUrls":{"48x48":"http://www.gravatar.com/avatar/2edb867fbee6e0cb054975ff1e4bcc8d?d=mm&s=48","24x24":"http://www.gravatar.com/avatar/2edb867fbee6e0cb054975ff1e4bcc8d?d=mm&s=24","16x16":"http://www.gravatar.com/avatar/2edb867fbee6e0cb054975ff1e4bcc8d?d=mm&s=16","32x32":"http://www.gravatar.com/avatar/2edb867fbee6e0cb054975ff1e4bcc8d?d=mm&s=32"},"displayName":"admin AWESOME","active":true},"created":"2014-12-12T22:13:09.053+0800","updated":"2014-12-12T22:13:09.053+0800"}]}

      Expected behaviour

      The Internal comment for Service Desk should include visibility attribute similar in its JSON data to JIRA's in the following

                  "visibility": {
                      "type": "role",
                      "value": "Administrators"
                  }

      Workaround (Thanks to Jaroslaw in his comment)

      • Add expand=properties to this REST URI
      • For example
        http://localhost:8080/rest/api/latest/issue/DESK-1/comment?expand=properties

            [JSDSERVER-1261] Comment return from REST API does not include Visibility for Service Desk Project

            Katherine Yabut made changes -
            Workflow Original: JAC Suggestion Workflow [ 3011129 ] New: JAC Suggestion Workflow 3 [ 3650168 ]
            Status Original: RESOLVED [ 5 ] New: Closed [ 6 ]

            Thank you for the this Discussion

            jaya devan added a comment - Thank you for the this Discussion

            Hey thanks for posting this update , just what i needed.

            Haresh Devaliya added a comment - Hey thanks for posting this update , just what i needed.
            Owen made changes -
            Workflow Original: Confluence Workflow - Public Facing v4 [ 2665700 ] New: JAC Suggestion Workflow [ 3011129 ]
            Owen made changes -
            Workflow Original: JSD Suggestion Workflow - TEMP [ 2324680 ] New: Confluence Workflow - Public Facing v4 [ 2665700 ]
            Status Original: Closed [ 6 ] New: Resolved [ 5 ]
            Andy Nguyen (Inactive) made changes -
            Link New: This issue relates to JSDSERVER-5538 [ JSDSERVER-5538 ]
            Katherine Yabut made changes -
            Workflow Original: JSD Suggestion Workflow [ 2053852 ] New: JSD Suggestion Workflow - TEMP [ 2324680 ]
            Katherine Yabut made changes -
            Workflow Original: JSD Suggestion Workflow - TEMP [ 2049093 ] New: JSD Suggestion Workflow [ 2053852 ]
            Katherine Yabut made changes -
            Workflow Original: JSD Suggestion Workflow [ 1280608 ] New: JSD Suggestion Workflow - TEMP [ 2049093 ]
            jonah (Inactive) made changes -
            Description Original: h4. Problem statement
            Internal comment and customer facing comment does not get separated when retrieving comment data via REST API

            h4. Steps to reproduce
            # Install Service Desk and use DESK project
            # On DESK-1 issue, add a comment to the customer, and comment for Internal
            # GET request to http://localhost:8080/rest/api/latest/issue/DESK-1/comment
            # The following are the results on my testing
            {code}{"startAt":0,"maxResults":2,"total":2,"comments":[{"self":"http://localhost:8080/rest/api/2/issue/10000/comment/10000","id":"10000","author":{"self":"http://localhost:8080/rest/api/2/user?username=admin","name":"admin","emailAddress":"admin@email","avatarUrls":{"48x48":"http://www.gravatar.com/avatar/2edb867fbee6e0cb054975ff1e4bcc8d?d=mm&s=48","24x24":"http://www.gravatar.com/avatar/2edb867fbee6e0cb054975ff1e4bcc8d?d=mm&s=24","16x16":"http://www.gravatar.com/avatar/2edb867fbee6e0cb054975ff1e4bcc8d?d=mm&s=16","32x32":"http://www.gravatar.com/avatar/2edb867fbee6e0cb054975ff1e4bcc8d?d=mm&s=32"},"displayName":"admin AWESOME","active":true},"body":"Testing to customer","updateAuthor":{"self":"http://localhost:8080/rest/api/2/user?username=admin","name":"admin","emailAddress":"admin@email","avatarUrls":{"48x48":"http://www.gravatar.com/avatar/2edb867fbee6e0cb054975ff1e4bcc8d?d=mm&s=48","24x24":"http://www.gravatar.com/avatar/2edb867fbee6e0cb054975ff1e4bcc8d?d=mm&s=24","16x16":"http://www.gravatar.com/avatar/2edb867fbee6e0cb054975ff1e4bcc8d?d=mm&s=16","32x32":"http://www.gravatar.com/avatar/2edb867fbee6e0cb054975ff1e4bcc8d?d=mm&s=32"},"displayName":"admin AWESOME","active":true},"created":"2014-12-12T22:12:58.263+0800","updated":"2014-12-12T22:12:58.263+0800"},{"self":"http://localhost:8080/rest/api/2/issue/10000/comment/10001","id":"10001","author":{"self":"http://localhost:8080/rest/api/2/user?username=admin","name":"admin","emailAddress":"admin@email","avatarUrls":{"48x48":"http://www.gravatar.com/avatar/2edb867fbee6e0cb054975ff1e4bcc8d?d=mm&s=48","24x24":"http://www.gravatar.com/avatar/2edb867fbee6e0cb054975ff1e4bcc8d?d=mm&s=24","16x16":"http://www.gravatar.com/avatar/2edb867fbee6e0cb054975ff1e4bcc8d?d=mm&s=16","32x32":"http://www.gravatar.com/avatar/2edb867fbee6e0cb054975ff1e4bcc8d?d=mm&s=32"},"displayName":"admin AWESOME","active":true},"body":"Testing internal","updateAuthor":{"self":"http://localhost:8080/rest/api/2/user?username=admin","name":"admin","emailAddress":"admin@email","avatarUrls":{"48x48":"http://www.gravatar.com/avatar/2edb867fbee6e0cb054975ff1e4bcc8d?d=mm&s=48","24x24":"http://www.gravatar.com/avatar/2edb867fbee6e0cb054975ff1e4bcc8d?d=mm&s=24","16x16":"http://www.gravatar.com/avatar/2edb867fbee6e0cb054975ff1e4bcc8d?d=mm&s=16","32x32":"http://www.gravatar.com/avatar/2edb867fbee6e0cb054975ff1e4bcc8d?d=mm&s=32"},"displayName":"admin AWESOME","active":true},"created":"2014-12-12T22:13:09.053+0800","updated":"2014-12-12T22:13:09.053+0800"}]}{code}

            h4. Expected behaviour
            The Internal comment for Service Desk should include _visibility_ attribute similar in its JSON data to JIRA's in the following
            {code} "visibility": {
                            "type": "role",
                            "value": "Administrators"
                        }{code}

            h4. Workaround (Thanks to Jaroslaw in [his comment|https://jira.atlassian.com/browse/JSD-1261?focusedCommentId=680912&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-680912])
            * Add {{expand=properties}} to [this REST URI|https://docs.atlassian.com/jira/REST/latest/#d2e457]
            * For example
            {code}http://localhost:8080/rest/api/latest/issue/DESK-1/comment?expand=properties{code}
            New: {panel:bgColor=#e7f4fa}
              *NOTE:* This suggestion is for *JIRA Service Desk Server*. Using *JIRA Service Desk Cloud*? [See the corresponding suggestion|http://jira.atlassian.com/browse/JSDCLOUD-1261].
              {panel}

            h4. Problem statement
            Internal comment and customer facing comment does not get separated when retrieving comment data via REST API

            h4. Steps to reproduce
            # Install Service Desk and use DESK project
            # On DESK-1 issue, add a comment to the customer, and comment for Internal
            # GET request to http://localhost:8080/rest/api/latest/issue/DESK-1/comment
            # The following are the results on my testing
            {code}{"startAt":0,"maxResults":2,"total":2,"comments":[{"self":"http://localhost:8080/rest/api/2/issue/10000/comment/10000","id":"10000","author":{"self":"http://localhost:8080/rest/api/2/user?username=admin","name":"admin","emailAddress":"admin@email","avatarUrls":{"48x48":"http://www.gravatar.com/avatar/2edb867fbee6e0cb054975ff1e4bcc8d?d=mm&s=48","24x24":"http://www.gravatar.com/avatar/2edb867fbee6e0cb054975ff1e4bcc8d?d=mm&s=24","16x16":"http://www.gravatar.com/avatar/2edb867fbee6e0cb054975ff1e4bcc8d?d=mm&s=16","32x32":"http://www.gravatar.com/avatar/2edb867fbee6e0cb054975ff1e4bcc8d?d=mm&s=32"},"displayName":"admin AWESOME","active":true},"body":"Testing to customer","updateAuthor":{"self":"http://localhost:8080/rest/api/2/user?username=admin","name":"admin","emailAddress":"admin@email","avatarUrls":{"48x48":"http://www.gravatar.com/avatar/2edb867fbee6e0cb054975ff1e4bcc8d?d=mm&s=48","24x24":"http://www.gravatar.com/avatar/2edb867fbee6e0cb054975ff1e4bcc8d?d=mm&s=24","16x16":"http://www.gravatar.com/avatar/2edb867fbee6e0cb054975ff1e4bcc8d?d=mm&s=16","32x32":"http://www.gravatar.com/avatar/2edb867fbee6e0cb054975ff1e4bcc8d?d=mm&s=32"},"displayName":"admin AWESOME","active":true},"created":"2014-12-12T22:12:58.263+0800","updated":"2014-12-12T22:12:58.263+0800"},{"self":"http://localhost:8080/rest/api/2/issue/10000/comment/10001","id":"10001","author":{"self":"http://localhost:8080/rest/api/2/user?username=admin","name":"admin","emailAddress":"admin@email","avatarUrls":{"48x48":"http://www.gravatar.com/avatar/2edb867fbee6e0cb054975ff1e4bcc8d?d=mm&s=48","24x24":"http://www.gravatar.com/avatar/2edb867fbee6e0cb054975ff1e4bcc8d?d=mm&s=24","16x16":"http://www.gravatar.com/avatar/2edb867fbee6e0cb054975ff1e4bcc8d?d=mm&s=16","32x32":"http://www.gravatar.com/avatar/2edb867fbee6e0cb054975ff1e4bcc8d?d=mm&s=32"},"displayName":"admin AWESOME","active":true},"body":"Testing internal","updateAuthor":{"self":"http://localhost:8080/rest/api/2/user?username=admin","name":"admin","emailAddress":"admin@email","avatarUrls":{"48x48":"http://www.gravatar.com/avatar/2edb867fbee6e0cb054975ff1e4bcc8d?d=mm&s=48","24x24":"http://www.gravatar.com/avatar/2edb867fbee6e0cb054975ff1e4bcc8d?d=mm&s=24","16x16":"http://www.gravatar.com/avatar/2edb867fbee6e0cb054975ff1e4bcc8d?d=mm&s=16","32x32":"http://www.gravatar.com/avatar/2edb867fbee6e0cb054975ff1e4bcc8d?d=mm&s=32"},"displayName":"admin AWESOME","active":true},"created":"2014-12-12T22:13:09.053+0800","updated":"2014-12-12T22:13:09.053+0800"}]}{code}

            h4. Expected behaviour
            The Internal comment for Service Desk should include _visibility_ attribute similar in its JSON data to JIRA's in the following
            {code} "visibility": {
                            "type": "role",
                            "value": "Administrators"
                        }{code}

            h4. Workaround (Thanks to Jaroslaw in [his comment|https://jira.atlassian.com/browse/JSD-1261?focusedCommentId=680912&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-680912])
            * Add {{expand=properties}} to [this REST URI|https://docs.atlassian.com/jira/REST/latest/#d2e457]
            * For example
            {code}http://localhost:8080/rest/api/latest/issue/DESK-1/comment?expand=properties{code}

              Unassigned Unassigned
              znoorsazali Zul NS [Atlassian]
              Votes:
              3 Vote for this issue
              Watchers:
              10 Start watching this issue

                Created:
                Updated:
                Resolved: