From 94412198e0a9600f9036164a4167624168d38495 Mon Sep 17 00:00:00 2001 From: Viktor van Wijk Date: Thu, 12 Dec 2024 09:43:16 +0100 Subject: [PATCH] :pencil2: [#4895] Rename event 'cosign confirmation' to 'cosign request' It is rather a cosign request email, since the cosign confirmation itself is not much different from the "normal" confirmation email. --- src/openforms/emails/constants.py | 2 +- src/openforms/submissions/tasks/emails.py | 2 +- src/openforms/submissions/tests/test_task_co_sign.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/openforms/emails/constants.py b/src/openforms/emails/constants.py index 7b2996319b..b61025ed71 100644 --- a/src/openforms/emails/constants.py +++ b/src/openforms/emails/constants.py @@ -9,7 +9,7 @@ class EmailEventChoices(models.TextChoices): registration = "registration", _("Registration") confirmation = "confirmation", _("Confirmation") - cosign_confirmation = "cosign_confirmation", _("Co-sign confirmation") + cosign_request = "cosign_request", _("Co-sign request") class EmailContentTypeChoices(models.TextChoices): diff --git a/src/openforms/submissions/tasks/emails.py b/src/openforms/submissions/tasks/emails.py index 55fb3437eb..5e9bfbc812 100644 --- a/src/openforms/submissions/tasks/emails.py +++ b/src/openforms/submissions/tasks/emails.py @@ -144,7 +144,7 @@ def send_email_cosigner(submission_id: int) -> None: "Content-Language": submission.language_code, X_OF_CONTENT_TYPE_HEADER: EmailContentTypeChoices.submission, X_OF_CONTENT_UUID_HEADER: str(submission.uuid), - X_OF_EVENT_HEADER: EmailEventChoices.cosign_confirmation, + X_OF_EVENT_HEADER: EmailEventChoices.cosign_request, }, ) except Exception: diff --git a/src/openforms/submissions/tests/test_task_co_sign.py b/src/openforms/submissions/tests/test_task_co_sign.py index 3fa1a74ce0..a76ac10f8c 100644 --- a/src/openforms/submissions/tests/test_task_co_sign.py +++ b/src/openforms/submissions/tests/test_task_co_sign.py @@ -177,7 +177,7 @@ def test_form_link_not_allowed_in_email(self): self.assertNotIn(form_link, email.body) self.assertIn(submission.public_registration_reference, email.body) - def test_headers_in_cosign_email(self): + def test_headers_in_cosign_request_email(self): submission = SubmissionFactory.from_components( components_list=[ { @@ -204,6 +204,6 @@ def test_headers_in_cosign_email(self): { "Content-Language": "nl", "X-OF-Content-Type": EmailContentTypeChoices.submission, - "X-OF-Event": EmailEventChoices.cosign_confirmation, + "X-OF-Event": EmailEventChoices.cosign_request, }, )