-
Type:
Bug
-
Resolution: Timed out
-
Priority:
Low
-
Component/s: Assets - External Import
-
2
-
Severity 3 - Minor
Issue Summary
When submitting PATCH OR PUT /mapping request through External Import APIs, existing reference attributes with different name and referenceObjectTypeName will result in following error, even though nothing has been changed in the payload nor existing object type to suggest the attribute has been changed
{"jsonValidationErrors":[],"dataValidationErrors":[{"code":"REFERENCED_OBJECT_TYPE_CHANGED","location":"PC.Storage"}],"status":"error"}
Steps to Reproduce
- Create new schema with an external import configuration and setup import token
- PUT to /mapping API initially to create ObjectTypes and Attributes in schema, with one ObjectType having a reference attribute that has different name and referenceObjectTypeName
- PATCH to /mapping API with same payload as 2.
Expected Results
204 from API response and schema/mapping updated accordingly
Actual Results
The below error response from API:
{"jsonValidationErrors":[],"dataValidationErrors":[{"code":"REFERENCED_OBJECT_TYPE_CHANGED","location":"PC.Storage"}],"status":"error"}
Workaround
Currently the workaround is to always have reference attribute's name and referenceObjectTypeName the same, or not to manipulate existing reference attribute when they have different name and referenceObjectTypeName.
It is best to have a new schema and create the import configuration from scratch, as a new duplicated attribute with a new name will be created if simply fixing the payload with same reference attribute name and referencedObjectTypeName, then doing a PATCH on existing schema.
If having the same name is not possible (eg. there's multiple reference attribute pointing to the same object type), then there's no workaround at this point it seems.
- is addressed by
-
JDW-5154 Loading...