Non-editable arrays are considered invalid when cloning a configuration

Erwan Rouchet
2026-03-03T08:08:47Z

https://redmine.teklia.com/issues/13062

The worker configuration store can be used to both view and edit a configuration, and cloning a configuration just means preparing the store to either view or edit an existing configuration instead of starting from scratch. Because of this, the store also has to deal with fields that are not editable.

Originally, because there would be Vue components loaded immediately to take control of each field and perform validation, the store could just ignore whether or not a field is editable. But we made the decision pretty late during the development of the new form to hide non-editable fields completely while editing a configuration. They still need to be visible when viewing one, so the store still handles those, but it now has to treat them differently.

Because there is nothing to perform the actual validation of the field, the store defaults to marking a non-editable field as valid immediately when its value is the constant value defined by the field. This currently isn't working with arrays, because [] === [] is false. And because we are hiding non-editable fields entirely, it's impossible to tell which field is actually invalid, so cloning a configuration with a non-editable field with many: true makes the form appear to be half-invalid.