When a letters has passed our validation but is not the postal provider

is unable to print the letter we need to mark the letter as failed.
If we mark the letter as a technical-failure, we say that we will fix
the issue, which is wrong because we can not fix the issue.
If we mark the letter as validation-failed, the letter is in wrong
bucket so the letter is not viewable/downloadable by the client.

This PR updates the message for a letter marked as permanent-failure to
better reflect what has actually happened.
This commit is contained in:
Rebecca Law
2021-06-10 08:56:14 +01:00
parent 1b459d6692
commit 498092f9ac
2 changed files with 6 additions and 2 deletions

View File

@@ -41,7 +41,7 @@
</p>
{% if template.template_type == 'letter' %}
{% if notification_status in ('permanent-failure', 'cancelled') %}
{% if notification_status == 'cancelled' %}
<p class="notification-status-cancelled">
Cancelled {{ updated_at|format_datetime_short }}
</p>
@@ -49,6 +49,10 @@
<p class="notification-status-cancelled">
{{ message.summary | safe }}
</p>
{% elif notification_status == 'permanent-failure' %}
<p class="notification-status-cancelled">
Permanent failure The postal provider is unable to print the letter. Your letter has not been sent.
</p>
{% elif notification_status == 'technical-failure' %}
<p class="notification-status-cancelled">
Technical failure Notify will resend once the team have

View File

@@ -442,7 +442,7 @@ def test_notification_page_shows_validation_failed_precompiled_letter(
@pytest.mark.parametrize('notification_status, expected_message', (
(
'permanent-failure',
'Cancelled 1 January at 1:02am',
'Permanent failure The postal provider is unable to print the letter. Your letter has not been sent.',
),
(
'cancelled',