Closed tmberthold closed 1 month ago
Investigation results:
the way that we currently update assets, we only copy a fixed set of fields. Custom properties are not supported via the wrapper API, which is used by the UI.
Only CustomJson
and CustomJsonLD
are supported to store custom properties.
I will redirect to someone with product vision about this problem, because this looks like it's working as intended.
@ununhexium I appreciate the clear assessment.
Given the user scenario AND your assessment, I envision that it is valuable to upgrade the API Wrapper to support Custom Properties.
@richardtreier @ununhexium some follow-up points for discussion:
The problem can be fixed on the UI side and the backend side.
On the frontend side:
The asset is currently PUT
ed to the backend, which means a replacement of the entire object. The custom property that goes missing is stored in customJsonLdAsString
.
To fix this specific problem:
customJsonLdAsString
value is passed to the asset edition endpointIn this example, it would be ... "customJsonLdAsString":"{\"http://purl.org/dc/terms/test\":\"https://google.com\"}" ...
And while checking this issue, also check that:
customJsonAsString
is supportedThe list of fields to pass can be found in the UiAsset
class.
In the long term, it would be better that the backend supports a PATCH
method to only change the modified fields and preserve the rest.
https://github.com/sovity/edc-ce/issues/1023
Got help from @richardtreier and the FE part is almost ready, functions good with the existing BE https://github.com/sovity/edc-ui/pull/794
Description - What happened? *
Original Issue:
Situation in a data offer custom-attributess are used, everything runs fine and even broker shows attributes. Now, eg. due to a typo, description of the data offer has to be corrected. For this the customer ist using the Connector-UI edit function. The content of the custom-attributes is overwritten without fault message.
Expected Behavior *
Original Issue:
Customer attributes are not supported for editing in UI, but there should be no overwritting of existing information.
Observed Behavior *
Existing custom attributes of an asset are deleted when the asset is edited via UI.
Steps to Reproduce
My steps to reproduce (TB):
Management-API: Create Asset using the Management-API adding additional custom attributes to the asset
POST http://localhost:11002/api/management/v3/assets
with POST-body (look for http://purl.org/dc/terms/test being custom attribute):UI: Validate in UI asset is created and custom attributes are available:
Context Information
TB: can confirm it using EDC CE 10.0.0 and UI 4.1.0.
Original Issue:
Relevant log output
No response
Screenshots
No response