Show letters that fail validation as cancelled

At the moment we show precompiled letters that have failed the
validation as having been sent. This is confusing.

We should communicate it as having been cancelled (rather than failed),
with the implication being that Notify has come along and cancelled the
letter before printing it. I think this is conceptually what makes the
most sense.

From the user’s point of view any letters that show up as cancelled
probably need to be fixed and resent, so it makes sense to group them
with the same name.
This commit is contained in:
Chris Hill-Scott
2018-10-29 12:11:47 +00:00
parent bbb4b87cac
commit f1a9761ea1
4 changed files with 21 additions and 3 deletions

View File

@@ -162,7 +162,7 @@
notification.template.template_type
) }}
{% endif %}
{% if notification.notification_type == "letter" and notification.status == 'permanent-failure' %}
{% if notification.notification_type == "letter" and notification.status in ['permanent-failure', 'validation-failed'] %}
Cancelled
{% endif %}
{% if notification.status|format_notification_status_as_url(notification.notification_type) %}

View File

@@ -39,6 +39,11 @@
<p class="notification-status-cancelled">
Cancelled {{ updated_at|format_datetime_short }}
</p>
{% elif notification_status == 'validation-failed' %}
<p class="notification-status-cancelled">
Cancelled {{ updated_at|format_datetime_short }}
(letter has content outside the printable area)
</p>
{% else %}
<p>
Postage: {{ postage }} class