From b63fa2b6ada42cd278ecb7941334d9f73da26d0c Mon Sep 17 00:00:00 2001 From: Lars Eggert Date: Mon, 27 Feb 2023 15:17:47 +0200 Subject: [PATCH 1/4] feat: Prefill the abstract, shepherd and AD info into a ballot writeup --- ietf/doc/mails.py | 2 +- ietf/templates/doc/mail/ballot_writeup.txt | 20 +++++++++++--------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/ietf/doc/mails.py b/ietf/doc/mails.py index b04caa5b7c..2d81d86be1 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, 'abstract': doc.abstract.rstrip()})) # 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 c808e5a4a7..9d3f6dca2f 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 %} +{{ abstract }} +{% 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,12 +27,14 @@ 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 .' - +{% endif %} IRTF Note (Insert IRTF Note here or remove section) @@ -42,7 +45,6 @@ IESG Note 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%} From 79c5806ff901d0bf61fb6ad6b59347348e660d67 Mon Sep 17 00:00:00 2001 From: Lars Eggert Date: Mon, 27 Feb 2023 16:18:43 +0200 Subject: [PATCH 2/4] Suggestions from @rjsparks --- ietf/doc/mails.py | 2 +- ietf/templates/doc/mail/ballot_writeup.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ietf/doc/mails.py b/ietf/doc/mails.py index 2d81d86be1..ddb2843cca 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, 'doc': doc, 'abstract': doc.abstract.rstrip()})) + 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 9d3f6dca2f..544ecccddc 100644 --- a/ietf/templates/doc/mail/ballot_writeup.txt +++ b/ietf/templates/doc/mail/ballot_writeup.txt @@ -1,6 +1,6 @@ {% load ietf_filters %}{% autoescape off %}Technical Summary {% if doc.abstract %} -{{ 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 From db5092943696065427b6f353e90980c35ba64646 Mon Sep 17 00:00:00 2001 From: Lars Eggert Date: Mon, 27 Feb 2023 17:41:19 +0200 Subject: [PATCH 3/4] Remove instructions to add IANA Expert template. --- ietf/templates/doc/mail/ballot_writeup.txt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ietf/templates/doc/mail/ballot_writeup.txt b/ietf/templates/doc/mail/ballot_writeup.txt index 544ecccddc..9887a598ab 100644 --- a/ietf/templates/doc/mail/ballot_writeup.txt +++ b/ietf/templates/doc/mail/ballot_writeup.txt @@ -31,9 +31,7 @@ Personnel 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 .' + Responsible Area Director? {% endif %} IRTF Note From e1b72314acf8e3994615e4bfe612436a4f72c236 Mon Sep 17 00:00:00 2001 From: Lars Eggert Date: Mon, 27 Feb 2023 19:19:27 +0200 Subject: [PATCH 4/4] Make "notes" fields for various bodies conditioned on the doc stream --- ietf/templates/doc/mail/ballot_writeup.txt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ietf/templates/doc/mail/ballot_writeup.txt b/ietf/templates/doc/mail/ballot_writeup.txt index 9887a598ab..7c7209cf6d 100644 --- a/ietf/templates/doc/mail/ballot_writeup.txt +++ b/ietf/templates/doc/mail/ballot_writeup.txt @@ -33,14 +33,13 @@ Personnel Who is the Document Shepherd for this document? Who is the Responsible Area Director? {% endif %} -IRTF Note +{% 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 %} {% filter wordwrap:"76"|indent:2 %}{{ iana }}{% endfilter %}