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

    XMLWordPrintable

Details

    • 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.

    Description

      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

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Backbone Issue Sync