Importing comment via JSON ignore sd.public.comment property set when customer are the author as it will always set as Internal

XMLWordPrintable

    • 12
    • Severity 3 - Minor
    • 6

      Issue Summary

      Based on Import Data from JSON documentation , JSM comment can be set as internal/public using the property key as below :-

      "properties":[{"key":"sd.public.comment","value":{"internal":"false"}}]
                              }
      

      Set to false for public , and true to internal. However , recently this doesn't work for comment author is a customer.

      It is best to ensure this property key works for both customer and agent account , as this will be challenging to creating the JSON data.

      This is reproducible on Data Center: (yes) / (no)

      Steps to Reproduce

      1. Create the JSON file with comment in it. Set customer as the comment author. Example as below :-
      {
        "projects": [
          {
            "key": "COLD",
            "issues": [
              {
                "attachments": [],
                "comments": [
                  {
                    "body": "Hi there,\n\nI’m sending an email because I’m having a problem setting up your new product. Can you help me troubleshoot?\n\nThanks, The Customer\n\n",
                    "author": "qm:961db1b3-b0fe-4aec-bcee-d150cba5f606:a261d4d3-45e7-4bba-ba0d-b0c79de01981",
                    "created": "2024-04-22T02:57:15Z",
                    "properties":[{"key":"sd.public.comment","value":{"internal":"false"}}],
                "externalId": 1,
                "issueType": "[System] Service request",
                "summary": "SAMPLE TICKET: Meet the ticket",
                "assignee": "557058:f5380b84-1a25-4ab3-8d1b-2df461b67abc",
                "reporter": "qm:961db1b3-b0fe-4aec-bcee-d150cba5f606:a261d4d3-45e7-4bba-ba0d-b0c79de01981",
                "customFieldValues": [
                              {
                                  "fieldName": "Request Type",
                                  "fieldType": "com.atlassian.servicedesk:vp-origin",
                                  "value": "cold/accountproblem"
                              }
                          ]
              }
              ]
              }
              ]
              }
      
      1. Go to External system import and import as JSON

      Expected Results

      Comment added as public

      Actual Results

      Customer comment added as internal

      Workaround

      For comment added as customer , change it to this format :-

      "comments": [
                  {
                    "body": "Hi there,\n\nI’m sending an email because I’m having a problem setting up your new product. Can you help me troubleshoot?\n\nThanks, The Customer\n\n",
                    "author": "qm:961db1b3-b0fe-4aec-bcee-d150cba5f606:a261d4d3-45e7-4bba-ba0d-b0c79de01981",
                    "created": "2024-04-22T02:57:15Z",
                    "properties":[{"key":"sd.allow.public.comment","value":{"allow":true}}]
                  }
                ]
      

      The property use for public comment by customer is :-

       "properties":[{"key":"sd.allow.public.comment","value":{"allow":true}}]
                  }
                ]
      

      Notes

      The sd.allow.public.comment property can't be use for author is a agent for that project.

            Assignee:
            Unassigned
            Reporter:
            Atiqah Roslan
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: