-
Bug
-
Resolution: Unresolved
-
Medium
-
18
-
Severity 3 - Minor
-
3
-
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
- Create a parent-child relationship between two objects types
- 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:
- Open the affected parent object type (this can be done using the search functionality in the respective object schema)
- 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)
- 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.