mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-05 19:18:24 -04:00
Merge pull request #3924 from alphagov/letter-permanent-failure
Permanent failure message for letters
This commit is contained in:
@@ -220,7 +220,7 @@ def format_notification_status(status, template_type):
|
|||||||
'failed': '',
|
'failed': '',
|
||||||
'technical-failure': 'Technical failure',
|
'technical-failure': 'Technical failure',
|
||||||
'temporary-failure': '',
|
'temporary-failure': '',
|
||||||
'permanent-failure': '',
|
'permanent-failure': 'Permanent failure',
|
||||||
'delivered': '',
|
'delivered': '',
|
||||||
'received': '',
|
'received': '',
|
||||||
'accepted': '',
|
'accepted': '',
|
||||||
|
|||||||
@@ -80,6 +80,7 @@
|
|||||||
('Printed', 'The provider has printed the letter. Letters are printed at 5:30pm and dispatched the next working day.'),
|
('Printed', 'The provider has printed the letter. Letters are printed at 5:30pm and dispatched the next working day.'),
|
||||||
('Cancelled', 'Sending cancelled. Your letter will not be printed or dispatched.'),
|
('Cancelled', 'Sending cancelled. Your letter will not be printed or dispatched.'),
|
||||||
('Technical failure', 'Notify had an unexpected error while sending the letter to our printing provider.'),
|
('Technical failure', 'Notify had an unexpected error while sending the letter to our printing provider.'),
|
||||||
|
('Permanent failure', 'The provider cannot print the letter. Your letter will not be dispatched.')
|
||||||
] %}
|
] %}
|
||||||
{% call row() %}
|
{% call row() %}
|
||||||
{{ text_field(message_length) }}
|
{{ text_field(message_length) }}
|
||||||
|
|||||||
@@ -41,7 +41,7 @@
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
{% if template.template_type == 'letter' %}
|
{% if template.template_type == 'letter' %}
|
||||||
{% if notification_status in ('permanent-failure', 'cancelled') %}
|
{% if notification_status == 'cancelled' %}
|
||||||
<p class="notification-status-cancelled">
|
<p class="notification-status-cancelled">
|
||||||
Cancelled {{ updated_at|format_datetime_short }}
|
Cancelled {{ updated_at|format_datetime_short }}
|
||||||
</p>
|
</p>
|
||||||
@@ -49,6 +49,10 @@
|
|||||||
<p class="notification-status-cancelled">
|
<p class="notification-status-cancelled">
|
||||||
{{ message.summary | safe }}
|
{{ message.summary | safe }}
|
||||||
</p>
|
</p>
|
||||||
|
{% elif notification_status == 'permanent-failure' %}
|
||||||
|
<p class="notification-status-cancelled">
|
||||||
|
Permanent failure – The provider cannot print the letter. Your letter will not be dispatched.
|
||||||
|
</p>
|
||||||
{% elif notification_status == 'technical-failure' %}
|
{% elif notification_status == 'technical-failure' %}
|
||||||
<p class="notification-status-cancelled">
|
<p class="notification-status-cancelled">
|
||||||
Technical failure – Notify will resend once the team have
|
Technical failure – Notify will resend once the team have
|
||||||
|
|||||||
@@ -741,7 +741,7 @@ def test_big_numbers_dont_show_for_letters(
|
|||||||
('letter', 'received', '27 September at 5:30pm', True),
|
('letter', 'received', '27 September at 5:30pm', True),
|
||||||
('letter', 'accepted', '27 September at 5:30pm', True),
|
('letter', 'accepted', '27 September at 5:30pm', True),
|
||||||
('letter', 'cancelled', '27 September at 5:30pm', False), # The API won’t return cancelled letters
|
('letter', 'cancelled', '27 September at 5:30pm', False), # The API won’t return cancelled letters
|
||||||
('letter', 'permanent-failure', '27 September at 5:31pm', False), # Deprecated for ‘cancelled’
|
('letter', 'permanent-failure', 'Permanent failure 27 September at 5:31pm', False),
|
||||||
('letter', 'temporary-failure', '27 September at 5:30pm', False), # Not currently a real letter status
|
('letter', 'temporary-failure', '27 September at 5:30pm', False), # Not currently a real letter status
|
||||||
('letter', 'virus-scan-failed', 'Virus detected 27 September at 5:30pm', False),
|
('letter', 'virus-scan-failed', 'Virus detected 27 September at 5:30pm', False),
|
||||||
('letter', 'validation-failed', 'Validation failed 27 September at 5:30pm', False),
|
('letter', 'validation-failed', 'Validation failed 27 September at 5:30pm', False),
|
||||||
|
|||||||
@@ -442,7 +442,7 @@ def test_notification_page_shows_validation_failed_precompiled_letter(
|
|||||||
@pytest.mark.parametrize('notification_status, expected_message', (
|
@pytest.mark.parametrize('notification_status, expected_message', (
|
||||||
(
|
(
|
||||||
'permanent-failure',
|
'permanent-failure',
|
||||||
'Cancelled 1 January at 1:02am',
|
'Permanent failure – The provider cannot print the letter. Your letter will not be dispatched.',
|
||||||
),
|
),
|
||||||
(
|
(
|
||||||
'cancelled',
|
'cancelled',
|
||||||
|
|||||||
Reference in New Issue
Block a user