open-formulieren / open-forms

Smart and dynamic forms
https://open-forms.readthedocs.io
Other
37 stars 26 forks source link

Export of Form with ZGW registration backend with legacy Zaaktype empty cannot be imported #4779

Open stevenbal opened 1 month ago

stevenbal commented 1 month ago

Product versie / Product version

latest / a755cd5c4be7388a28aebce490c4e508da7908aa

Customer reference

No response

Omschrijf het probleem / Describe the bug

If I export a form that has ZGW registration backend and uses the Zaaktype select instead of the legacy URL field:

image

And I export it, the export has zaaktype="" in the registration options:

"registration_backends": [{"key": "backend1", "name": "zgw", "backend": "zgw-create-zaak", "options": {"zaaktype": "", "catalogue": {"rsin": "000000000", "domain": "TEST"}, "objecttype": "http://localhost:8001/api/v2/bla", "zgw_api_group": 1, "objects_api_group": 1, "property_mappings": [], "informatieobjecttype": "http://localhost:8003/catalogi/api/v1/informatieobjecttypen/531f6c1a-97f7-478c-85f0-67d2f23661c7", "case_type_identification": "ZT-001"}}]

If I try to import this form, the import fails because of this empty zaaktype:

image

Stappen om te reproduceren / Steps to reproduce

  1. Create a Form
  2. Add zgw registration backend and select a zaaktype (leave legacy field empty)
  3. Export the form
  4. Try to import the form
  5. Observe the error

Verwacht gedrag / Expected behavior

The zaaktype field should be properly exported, also if the legacy field is empty

Screen resolution

None

Device

None

OS

None

Browser

No response