From 6adead355d6827f8fe61e72a71f8db7b3f74a516 Mon Sep 17 00:00:00 2001 From: Jennifer Richards Date: Sat, 26 Aug 2023 17:58:40 -0300 Subject: [PATCH] fix: Improve status page for canceled submissions (#6221) * fix: Show quieter alert for metadata error in canceled submission * fix: Suppress metadata errors and show warning for canceled submissions * style: Fix indentation in HTML * fix: Give better notice of a processing error --- ietf/submit/views.py | 21 ++++++++++++++++++-- ietf/templates/submit/submission_status.html | 8 ++++++-- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/ietf/submit/views.py b/ietf/submit/views.py index 798fbf307..552342eb3 100644 --- a/ietf/submit/views.py +++ b/ietf/submit/views.py @@ -317,7 +317,10 @@ def submission_status(request, submission_id, access_token=None): if access_token and not key_matched: raise Http404 - errors = validate_submission(submission) + if submission.state.slug == "cancel": + errors = {} + else: + errors = validate_submission(submission) passes_checks = all([ c.passed!=False for c in submission.checks.all() ]) is_secretariat = has_role(request.user, "Secretariat") @@ -353,7 +356,21 @@ def submission_status(request, submission_id, access_token=None): message = None if submission.state_id == "cancel": - message = ('error', 'This submission has been cancelled, modification is no longer possible.') + # would be nice to have a less heuristic mechansim for reporting async processing failure + async_processing_error = submission.submissionevent_set.filter( + desc__startswith="Submission rejected: A system error occurred" + ).exists() + if async_processing_error: + message = ( + "error", + "This submission has been cancelled due to a system error during processing. " + "Modification is no longer possible.", + ) + else: + message = ( + "error", + "This submission has been cancelled, modification is no longer possible.", + ) elif submission.state_id == "auth": message = ('success', 'The submission is pending email authentication. An email has been sent to: %s' % ", ".join(confirmation_list)) elif submission.state_id == "grp-appr": diff --git a/ietf/templates/submit/submission_status.html b/ietf/templates/submit/submission_status.html index 2d166b5df..03c40e376 100644 --- a/ietf/templates/submit/submission_status.html +++ b/ietf/templates/submit/submission_status.html @@ -152,9 +152,13 @@ {% endwith %} Please contact the secretariat for assistance if it has been more than an hour. - {% else %} + {% else %}

Meta-data from the submission

- {% if errors %} + {% if submission.state.slug == "cancel" %} +
+ Note: The meta-data shown for a cancelled draft may be incorrect or incomplete. +
+ {% elif errors %}

Meta-Data errors found!