Change in Assets object PUT payload behavior within the new architecture

XMLWordPrintable

    • 5
    • Minor
    • Warranty

      Issue Summary

      Using the Put object endpoint with the Jira Service Management Cloud Assets REST API, if the hasAvatar is missing from the request body, an object activity entry is made indicating the user executing the payload has deleted the avatar.

      The same payload on the original architecture did not behave this way. The documentation has this as an optional value, however if the value true is not passed to it, then hasAvatar is treated as false and the entry is made.

      Steps to Reproduce

      1. Create a payload to update an attribute of an Assets object
      2. Within the payload do not define the hasAttribute value
      3. Execute the PUT action on the object via the API

      Sample payload:

      {
        "attributes": [
          {
            "objectTypeAttributeId": "708",
            "objectAttributeValues": [
              {
                "value": "Yellow"
              }
            ]
          }
        ],
        "objectTypeId": "126"
      }

      Expected Results

      The attribute is updated and there is no activity event for the avatar

      Actual Results

      The attribute is updated, however there is an additional activity event indicating the avatar has been deleted:

      ExampleUser has deleted the avatar.

      Workaround

      Add the "hasAvatar": true value to the payload, ie:

      {
        "attributes": [
          {
            "objectTypeAttributeId": "708",
            "objectAttributeValues": [
              {
                "value": "Yellow"
              }
            ]
          }
        ],
        "objectTypeId": "126",
        "hasAvatar": true
      }

       

            Assignee:
            Sugandha Raheja
            Reporter:
            Andras M.
            Votes:
            1 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved: