Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing StUF-ZDS plugin conversion #4868

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions docs/installation/upgrade-300.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
16 changes: 0 additions & 16 deletions src/openforms/forms/api/serializers/form.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
56 changes: 0 additions & 56 deletions src/openforms/forms/tests/test_import_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
}
],
},
)
Loading