diff --git a/docs/installation/upgrade-300.rst b/docs/installation/upgrade-300.rst index c1594a2c4d..6f0a677cb0 100644 --- a/docs/installation/upgrade-300.rst +++ b/docs/installation/upgrade-300.rst @@ -67,3 +67,10 @@ Removal of legacy translations conversion Old (from before Open Forms 2.4) form export files containing form field translations in the legacy format are now ignored instead of converted to the new format. We recommend re-creating the exports on a newer version of Open Forms. + +StUF-ZDS payments extension conversion +-------------------------------------- + +The import conversion of StUF-ZDS plugin extensions, back to the default StUF-ZDS plugin, +has been removed. We recommend re-creating the exports on a newer version of Open Forms, +or manually changing the plugin to `stuf-zds-create-zaak` in the export files. diff --git a/src/openforms/forms/api/serializers/form.py b/src/openforms/forms/api/serializers/form.py index 76d73dfda5..07c938a3b1 100644 --- a/src/openforms/forms/api/serializers/form.py +++ b/src/openforms/forms/api/serializers/form.py @@ -75,22 +75,6 @@ def get_fields(self): fields["backend"].choices = registration_register.get_choices() return fields - def to_internal_value(self, data): - - if self.context.get("is_import", False): - if data.get("backend") == "stuf-zds-create-zaak:ext-utrecht": - from openforms.registrations.contrib.stuf_zds.plugin import ( - PLUGIN_IDENTIFIER, - ) - - warnings.warn( - "The automatic conversion from StUF-ZDS payments extension to " - "StUF-ZDS during import will be removed in Open Forms 3.0", - category=DeprecationWarning, - ) - data["backend"] = PLUGIN_IDENTIFIER - return super().to_internal_value(data) - def validate(self, attrs): # validate config options with selected plugin if "backend" not in attrs: diff --git a/src/openforms/forms/tests/test_import_export.py b/src/openforms/forms/tests/test_import_export.py index 8e2c1e5385..6940f67dee 100644 --- a/src/openforms/forms/tests/test_import_export.py +++ b/src/openforms/forms/tests/test_import_export.py @@ -1613,59 +1613,3 @@ def test_import_form_with_zgw_registration_backend_cant_determine_objects_api_gr registration_backend.options["objects_api_group"], objects_api_group.pk, ) - - -class ImportStUFZDSTests(TempdirMixin, TestCase): - def test_extension_plugin_id_is_converted(self): - resources = { - "forms": [ - { - "active": True, - "name": "Test Form 1", - "internal_name": "Test Form Internal 1", - "slug": "zds-from-extension", - "uuid": "324cadce-a627-4e3f-b117-37ca232f16b2", - "registration_backends": [ - { - "key": "test-backend", - "name": "Test backend", - "backend": "stuf-zds-create-zaak:ext-utrecht", - "options": { - "zds_zaaktype_code": "TEST", - "zds_documenttype_omschrijving_inzending": "omschrijving", - "zds_zaakdoc_vertrouwelijkheid": "VERTROUWELIJK", - "payment_status_update_mapping": [ - { - "form_variable": "provider_payment_ids", - "stuf_name": "providerPaymentID", - } - ], - }, - } - ], - } - ] - } - - with zipfile.ZipFile(self.filepath, "w") as zip_file: - for name, data in resources.items(): - zip_file.writestr(f"{name}.json", json.dumps(data)) - - call_command("import", import_file=self.filepath) - - registration_backend = FormRegistrationBackend.objects.get(key="test-backend") - self.assertEqual(registration_backend.backend, "stuf-zds-create-zaak") - self.assertEqual( - registration_backend.options, - { - "zds_zaaktype_code": "TEST", - "zds_documenttype_omschrijving_inzending": "omschrijving", - "zds_zaakdoc_vertrouwelijkheid": "VERTROUWELIJK", - "payment_status_update_mapping": [ - { - "form_variable": "provider_payment_ids", - "stuf_name": "providerPaymentID", - } - ], - }, - )