Closed lassopicasso closed 2 months ago
Attention: Patch coverage is 97.93814%
with 4 lines
in your changes missing coverage. Please review.
Project coverage is 77.76%. Comparing base (
0475f96
) to head (67e604b
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Description
This PR introduces support for two formats of data model binding in config:
dataType
andfield
.For now, the new format is behind a feature flag,
multipleDataModelsPerTask
. Once this flag is removed, changes to data model bindings will always be saved in the new format.With the feature flag enabled, users can select both the data model and the specific property of the data model bindings in the configuration of the selected component.
Additionally, validation has been added to handle cases where a data model or a data model field binding no longer exists. In both cases, the data model field will fall back to a dummy option with an empty string. If the data model itself no longer exists, it will fall back to the default data model.
Refactoring
editDataModelBinding.
Additional
Added/updated unit tests and playwright tests
Note
A new file,
SelectDataFieldBinding.tsx
, has been created for logic related to data field binding. This decision was made because the existingSelectDataFieldComponent
file was difficult to work with due to its linkage to deprecated "rule for calculations" code. The existing file is expected to be removed in issue https://github.com/Altinn/altinn-studio/issues/13027 or later on.Related Issue(s)
12738
12740
Verification