Fix the internal review email template and related code to handle IRTF RGs

better. Commit ready for merge.
 - Legacy-Id: 10673
This commit is contained in:
Lars Eggert 2016-01-13 13:50:16 +00:00
parent 37c5d3170a
commit bcea97323f
3 changed files with 13 additions and 13 deletions

View file

@ -98,7 +98,7 @@ def generate_last_call_announcement(request, doc):
group = "an individual submitter"
expiration_date += datetime.timedelta(days=14)
else:
group = "the %s WG (%s)" % (doc.group.name, doc.group.acronym)
group = "the %s %s (%s)" % (doc.group.name, doc.group.type.name, doc.group.acronym)
doc.filled_title = textwrap.fill(doc.title, width=70, subsequent_indent=" " * 3)
@ -162,7 +162,7 @@ def generate_approval_mail_approved(request, doc):
# the second check catches some area working groups (like
# Transport Area Working Group)
if doc.group.type_id not in ("area", "individ", "ag") and not doc.group.name.endswith("Working Group"):
if doc.group.type_id not in ("area", "individ", "ag", "rg") and not doc.group.name.endswith("Working Group"):
doc.group.name_with_wg = doc.group.name + " Working Group"
else:
doc.group.name_with_wg = doc.group.name
@ -467,7 +467,7 @@ def email_charter_internal_review(request, charter):
markup=False,
)
send_mail(request, addrs.to, settings.DEFAULT_FROM_EMAIL,
'Internal WG Review: %s (%s)'%(charter.group.name,charter.group.acronym),
'Internal %s Review: %s (%s)'%(charter.group.type.name,charter.group.name,charter.group.acronym),
'doc/mail/charter_internal_review.txt',
dict(charter=charter,
chairs=charter.group.role_set.filter(name='chair').values_list('person__name',flat=True),

View file

@ -103,7 +103,7 @@ class EditCharterTests(TestCase):
if slug=="intrev":
self.assertTrue("Internal WG Review" in outbox[-3]['Subject'])
self.assertTrue(all([x in outbox[-3]['To'] for x in ['iab@','iesg@']]))
self.assertTrue("A new IETF working" in outbox[-3].get_payload())
self.assertTrue("A new IETF WG" in outbox[-3].get_payload())
self.assertTrue("state changed" in outbox[-2]['Subject'].lower())
self.assertTrue("iesg-secretary@" in outbox[-2]['To'])

View file

@ -1,19 +1,19 @@
{% autoescape off %}{% filter wordwrap:73 %}
{% if review_type == "new" %}A new IETF working group is being considered in the {{ charter.group.parent.name }}.{% endif %}{% if review_type == "recharter" %}A new charter for the {{ charter.group.name }} ({{charter.group.acronym}}) working group in the {{ charter.group.parent.name }} of the IETF is being considered. {% endif %} The draft charter for this working group is provided below for your review and comment.
{% if review_type == "new" %}A new {% if charter.group.type_id == "rg" %}IRTF{% else %}IETF{% endif %} {{ charter.group.type.name }} is being considered in the {% if charter.group.type_id == "rg" %}IRTF{% else %}IETF{% endif %}.{% elif review_type == "recharter" %}A new charter for the {{ charter.group.name }} ({{charter.group.acronym}}) {{ charter.group.type.name }} {% if charter.group.type_id == "rg" %}IRTF{% else %}in the {{ charter.group.parent }} of the IETF{% endif %} is being considered. {% endif %} The draft charter for this {{ charter.group.type.name }} is provided below for your review and comment.
Review time is one week.
Review time is one week.
The IETF Secretariat
The IETF Secretariat
{{charter.group.name}} ({{ charter.group.acronym }})
--------------------------------------------------
Current Status: {{ charter.group.state.name }} {% if charter.group.state_id != 'bof' %}Working Group{% endif %}
Chairs : {{ chairs|join:', '|default:'TBD' }}
{{charter.group.name}} ({{ charter.group.acronym }})
--------------------------------------------------
Current Status: {{ charter.group.state.name }} {{ charter.group.type.name }}
Chairs: {{ chairs|join:', '|default:'TBD' }}
{% if charter.group.type_id != "rg" %}
Area Director: {{ ads|join:', '|default:'TBD' }}
{% endif %}
Mailing List: {{ charter.group.list_email|default:'TBD' }}
{{ charter.name }}-{{ charter.rev }}