From fbfd204eb9bb4aa56f3ca622079e3e77fdd2287a Mon Sep 17 00:00:00 2001 From: Robert Sparks Date: Thu, 28 Mar 2019 10:07:11 +0000 Subject: [PATCH] Include the note itself in email sent when the RFC editor note changes after document approval. Also changed the flow to redirect back to the writeups pages after editing the RFC editor note. Fixes #2672. Commit ready for merge. - Legacy-Id: 16110 --- ietf/doc/tests_ballot.py | 4 ++-- ietf/doc/views_ballot.py | 1 + ietf/templates/doc/ballot/ednote_changed_late.txt | 6 +++++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ietf/doc/tests_ballot.py b/ietf/doc/tests_ballot.py index a002467af..2a90d586b 100644 --- a/ietf/doc/tests_ballot.py +++ b/ietf/doc/tests_ballot.py @@ -399,7 +399,7 @@ class BallotWriteupsTests(TestCase): r = self.client.post(url, dict( rfc_editor_note="This is a simple test.", save_ballot_rfceditornote="1")) - self.assertEqual(r.status_code, 200) + self.assertEqual(r.status_code, 302) draft = Document.objects.get(name=draft.name) self.assertTrue(draft.has_rfc_editor_note()) self.assertTrue("This is a simple test" in draft.latest_event(WriteupDocEvent, type="changed_rfc_editor_note_text").text) @@ -419,7 +419,7 @@ class BallotWriteupsTests(TestCase): r = self.client.post(url, dict( rfc_editor_note='This is a new note.', save_ballot_rfceditornote="1")) - self.assertEqual(r.status_code, 200) + self.assertEqual(r.status_code, 302) self.assertEqual(len(outbox),1) self.assertIn('RFC Editor note changed',outbox[-1]['Subject']) diff --git a/ietf/doc/views_ballot.py b/ietf/doc/views_ballot.py index 12a58c642..5dbec8c36 100644 --- a/ietf/doc/views_ballot.py +++ b/ietf/doc/views_ballot.py @@ -694,6 +694,7 @@ def ballot_rfceditornote(request, name): ) ) send_mail_preformatted(request, msg) + return redirect('ietf.doc.views_doc.document_writeup', name=doc.name) if request.method == 'POST' and "clear_ballot_rfceditornote" in request.POST: e = WriteupDocEvent(doc=doc, rev=doc.rev, by=login) diff --git a/ietf/templates/doc/ballot/ednote_changed_late.txt b/ietf/templates/doc/ballot/ednote_changed_late.txt index cb0a42ed5..cb80fa6d5 100644 --- a/ietf/templates/doc/ballot/ednote_changed_late.txt +++ b/ietf/templates/doc/ballot/ednote_changed_late.txt @@ -4,5 +4,9 @@ Subject: RFC Editor note changed for {{event.doc}} The RFC Editor note for {{event.doc}} has changed after the doc was approved. -The new note can be seen at {{settings.IDTRACKER_BASE_URL}}{% url 'ietf.doc.views_doc.document_writeup' name=event.doc.name %} +The new note is below, but can also be seen at {{settings.IDTRACKER_BASE_URL}}{% url 'ietf.doc.views_doc.document_writeup' name=event.doc.name %} + +----- +{{ event.text}} + {% endautoescape %} \ No newline at end of file