Uploaded image for project: 'Jira Service Management Cloud'
  1. Jira Service Management Cloud
  2. JSDCLOUD-12692

Creating circular references between object types makes them disappear from the UI

      Issue Summary

      Object types can have parent-child relationships. However, it is possible to create a circular reference between them, and when this happens, it makes all the object types related to the circular reference disappear from the UI. 

      User with "Object schema Developers" or "Object schema users" role won't be able to fetch object types from the schema which has circular parent-child references between two objects. 

      Steps to Reproduce

      1. Create a parent-child relationship between two objects types
      2. Using REST API, create a circular reference from a child to its parent object type

      This can happen using the drag and drop functionality as well

      Expected Results

      The circular reference will not be created

      Actual Results

      The circular reference is created, making the object types related to the circular reference disappear from the UI. 

      For Users with "Object schema Developers" or "Object schema users" - the affected Schema will be visible in the schema list, but users will get Error when trying to view the Object Types in the schema.  

      Workaround

      To remove the circular reference:

      1. Open the affected parent object type (this can be done using the search functionality in the respective object schema)
      2. Get its ID from the URL parameter called typeId=XXX (example: https://instance.atlassian.net/jira/servicedesk/assets/object-schema/XX?typeId=XXX&objectId=XXXXX)
      3. Now run the CURL command below, replacing the parameters as needed:
        curl --location 'https://<instance>.atlassian.net/gateway/api/jsm/assets/workspace/<workspace_id>/v1/objecttype/<object_type_id>/position' \
        --header 'Content-Type: application/json' \
        --header 'Authorization: Basic base64-user-password' \
        --data '{
            "position": 0,
            "toObjectTypeId": "<parent_OT_ID>"
        }'
        

      Parameters:

      • <instance>: Your Jira instance name
      • <workspace_id>: The Assets workspace ID can be retrieved using (https://<instance>.atlassian.net/rest/servicedeskapi/assets/workspace)
      • <object_type_id>: ID obtained from Step 2 (typeID=XXX)

      This will cause the parent object type to be moved to the root position on your object schema tree, and with that, you can move it back to where it was before the issue.

      If you are uncomfortable using REST API or trying to fix this issue, you can open a support request using Atlassian's contact form.

            [JSDCLOUD-12692] Creating circular references between object types makes them disappear from the UI

            There are no comments yet on this issue.

              Unassigned Unassigned
              bd0e47de2684 Yuri Moura (Inactive)
              Affected customers:
              2 This affects my team
              Watchers:
              11 Start watching this issue

                Created:
                Updated: