Details
-
Bug
-
Resolution: Unresolved
-
Low
-
None
-
4.22.6
-
None
-
1
-
Severity 3 - Minor
-
Description
Issue Summary
When updating the Assets object attribute using REST API "Update object attribute" with the same value, the object 'Updated' values on objects gets updated even though there is no change to the attribute value and there is no reference in the object history as well.
This is reproducible on Data Center: Yes
Steps to Reproduce
Step #1: Create an Insight object which has at least one additional attribute (the attribute type we tried it with are Default Text and Object reference)
Step #2: Find the ID of a single attribute, for a specific object to edit, with SQL (we are looking for value in column ot.ID):
select * from AO_8542F1_IFJ_OBJ_ATTR ot left outer join AO_8542F1_IFJ_OBJ o on o.id = ot.OBJECT_ID left outer join AO_8542F1_IFJ_OBJ_TYPE_ATTR ota on ota.id = ot.OBJECT_TYPE_ATTRIBUTE_ID where o.ID = <ID_OF_NEWLY_CREATED_OBJECT> AND ot.OBJECT_TYPE_ATTRIBUTE_ID = <ID_OF_ATTRIBUTE_TO_EDIT>;
Step #3: Edit the value of the attribute to the same value it already has with the given REST call (Example: text attribute already has value 'Super Mega Test', and with REST call we will update the value to the same 'Super Mega Test'):
REST call and REST call’s body:
PUT https://<JIRA_URL>/rest/insight/1.0/objectattribute/<ID_FOUND_IN_STEP_2>
{ "objectAttributeValues": [ { "value": "Super Mega Test" } ] }
This issue happens only when you edit the object attribute using the above REST API before any manual updation. If you try to edit the attribute the same way on an already existing object which was already somehow edited, it works as expected. Object updated value doesn't change and the object attribute updated value doesn't change either.
Expected Results
The object's updated value should not be changed.
Actual Results
Object Updated value gets changed and it is inconsistent
Workaround
"Update object attribute" is already deprecated. We don't see issues updating the object using the "Update object" API so we can consider using this API to avoid any issues.