Uploaded image for project: 'Jira Service Management Data Center'
  1. Jira Service Management Data Center
  2. JSDSERVER-12645

Assets REST API - Update object attribute - cause mismatched 'Updated' values on objects

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Low
    • None
    • 4.22.6
    • None

    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.

      Attachments

        1. 65678.png
          132 kB
          Prabhu Subramaniyan

        Activity

          People

            Unassigned Unassigned
            f75285566e0c Prabhu Subramaniyan
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Backbone Issue Sync