From caf80efd84dc6a1c80772c67b42d4ccc9c2d739f Mon Sep 17 00:00:00 2001 From: Lars Eggert Date: Mon, 27 Feb 2023 18:19:39 +0000 Subject: [PATCH] feat: Prefill the abstract, shepherd and AD info into a ballot writeup (#5218) * feat: Prefill the abstract, shepherd and AD info into a ballot writeup * Suggestions from @rjsparks * Remove instructions to add IANA Expert template. * Make "notes" fields for various bodies conditioned on the doc stream --- ietf/doc/mails.py | 2 +- ietf/templates/doc/mail/ballot_writeup.txt | 31 +++++++++++----------- 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/ietf/doc/mails.py b/ietf/doc/mails.py index b04caa5b7..ddb2843cc 100644 --- a/ietf/doc/mails.py +++ b/ietf/doc/mails.py @@ -175,7 +175,7 @@ def generate_ballot_writeup(request, doc): e.doc = doc e.rev = doc.rev e.desc = "Ballot writeup was generated" - e.text = force_text(render_to_string("doc/mail/ballot_writeup.txt", {'iana': iana})) + e.text = force_text(render_to_string("doc/mail/ballot_writeup.txt", {'iana': iana, 'doc': doc })) # caller is responsible for saving, if necessary return e diff --git a/ietf/templates/doc/mail/ballot_writeup.txt b/ietf/templates/doc/mail/ballot_writeup.txt index c808e5a4a..7c7209cf6 100644 --- a/ietf/templates/doc/mail/ballot_writeup.txt +++ b/ietf/templates/doc/mail/ballot_writeup.txt @@ -1,11 +1,12 @@ -{% autoescape off %} -Technical Summary - +{% load ietf_filters %}{% autoescape off %}Technical Summary +{% if doc.abstract %} +{{ doc.abstract.rstrip }} +{% else %} Relevant content can frequently be found in the abstract and/or introduction of the document. If not, this may be an indication that there are deficiencies in the abstract or introduction. - +{% endif %} Working Group Summary Was there anything in the WG process that is worth noting? @@ -26,23 +27,21 @@ Document Quality Review, on what date was the request posted? Personnel - +{% if doc.shepherd and doc.ad %}{% filter wordwrap:"76" %} + The Document Shepherd for this document is {{ doc.shepherd.person.name }}. The Responsible Area Director is {{ doc.ad.name }}.{% endfilter %} +{% else %} Who is the Document Shepherd for this document? Who is the - Responsible Area Director? If the document requires IANA - experts(s), insert 'The IANA Expert(s) for the registries - in this document are .' - -IRTF Note + Responsible Area Director? +{% endif %} +{% if doc.stream.slug == "irtf" %}IRTF Note (Insert IRTF Note here or remove section) - -IESG Note +{% elif doc.stream.slug == "ietf" %}IESG Note (Insert IESG Note here or remove section) - +{% endif %} IANA Note {% if iana %} - {% load ietf_filters %}{% filter wordwrap:"76"|indent:2 %}{{ iana }}{% endfilter %} + {% filter wordwrap:"76"|indent:2 %}{{ iana }}{% endfilter %} {% endif %} - (Insert IANA Note here or remove section) -{% endautoescape%} + (Insert IANA Note here or remove section){% endautoescape%}