Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Asset update] Adapt frontend to use correct payload and endpoints #260

Open
vin0401 opened this issue Jul 16, 2024 · 1 comment
Open

[Asset update] Adapt frontend to use correct payload and endpoints #260

vin0401 opened this issue Jul 16, 2024 · 1 comment
Assignees

Comments

@vin0401
Copy link

vin0401 commented Jul 16, 2024

Description:

When an update is sent to the asset update endpoint, not all values are updated correctly.

Reproduction:

Example request payload:

{"data":{"properties":[{"key":"My predefined property","type":"text","data":"test test","inherited":false,"inheritable":false,"additionalAttributes":[],"config":"","description":"tes test","predefinedName":"My predefined property"}]}}

Current behavior:

The predefined property is automatically converted to a custom property.
Also it seems like that the description is not saved.
When I look at the schema definition, there are also the properties for description and predefinedName missing:

image

Expected behavior:

All values are updated correctly. The schema documentation is showing all required fields for the update.

@vin0401 vin0401 changed the title [Asset update] Properties are not correctly updated [Asset update] Properties are not updated correctly Jul 16, 2024
@mattamon mattamon self-assigned this Aug 5, 2024
@mattamon
Copy link
Contributor

mattamon commented Aug 5, 2024

Current behavior is like the following:

Update asset properties works different than updating the list of properties or a predefined property itself.

For the asset -> the key that is sent in the data is matched with the predefined properties in the background. If the key is found in the predefined properties, the name will be set accordingly.
If the key is not found it will get the name "Custom".

The main difference lies in the schemas:

  • UpdateDataProperty with key, data, type and inheritable
  • UpdatePredefinedProperty with name, description, key, type, data, config, ctype, inheritable

The example request payload does not work with the Asset Update endpoint since it resembles more the UpdatePredefineProperty Schema instead of the UpdateDataProperty.

Currently though it is not possible to update the description of Custom Properties. Maybe we should think about it and then add it to the UpdateDataProperty Schema and asset update endpoint.

@mattamon mattamon changed the title [Asset update] Properties are not updated correctly [Asset update] Adapt frontend to use correct payload and endpoints Aug 14, 2024
@pimcore pimcore deleted a comment from github-actions bot Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants