Merged in [16110] from rjsparks@nostrum.com:

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.
 - Legacy-Id: 16130
Note: SVN reference [16110] has been migrated to Git commit fbfd204eb9
This commit is contained in:
Henrik Levkowetz 2019-04-03 19:30:10 +00:00
commit 5aad3a652d
3 changed files with 8 additions and 3 deletions

View file

@ -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'])

View file

@ -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)

View file

@ -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 %}