-
Type:
Bug
-
Resolution: Fixed
-
Priority:
High
-
Component/s: Assets - Service, performance, functionality
-
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
- Create a payload to update an attribute of an Assets object
- Within the payload do not define the hasAttribute value
- 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
}