Skip to content

Commit 3c478e5

Browse files
committed
email confirming interim meeting request now says 'the Area Director of the <area>' instead of '<area> Area Director'. Fixes issue ietf-tools#2522. Commit ready to merge.
- Legacy-Id: 15344
1 parent 0ece320 commit 3c478e5

3 files changed

Lines changed: 8 additions & 7 deletions

File tree

ietf/doc/templatetags/ietf_filters.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -508,10 +508,6 @@ def comma_separated_list(seq, end_word="and"):
508508
return u"".join(seq)
509509
else:
510510
return u", ".join(seq[:-1]) + u" %s %s"%(end_word, seq[-1])
511-
512-
@register.filter()
513-
def role_names(roles):
514-
return list(set([ "%s %s" % (r.group.name, r.name.name) for r in roles ]))
515511

516512
@register.filter()
517513
def zaptmp(s):

ietf/meeting/helpers.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ def make_materials_directories(meeting):
484484

485485

486486
def send_interim_approval_request(meetings):
487-
"""Sends an email to the secretariat, group chairs, and resposnible area
487+
"""Sends an email to the secretariat, group chairs, and responsible area
488488
director or the IRTF chair noting that approval has been requested for a
489489
new interim meeting. Takes a list of one or more meetings."""
490490
group = meetings[0].session_set.first().group
@@ -501,7 +501,12 @@ def send_interim_approval_request(meetings):
501501
is_series = True
502502
else:
503503
is_series = False
504-
context = locals()
504+
approver_set = set()
505+
for role in group.interim_approval_roles():
506+
approver = "%s of the %s" % ( role.name.name, role.group.name)
507+
approver_set.add(approver)
508+
approvers = list(approver_set)
509+
context = locals() # TODO Unnecessarily complex, context needs to only contain what the template needs
505510
send_mail(None,
506511
to_email,
507512
from_email,

ietf/templates/meeting/interim_approval_request.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{% load ams_filters %}{% load ietf_filters %}
22
A new interim meeting {% if is_series %}series {% endif %}request has just been submitted by {{ requester }}.
33

4-
This request requires approval by the {{ group.interim_approval_roles|role_names|comma_separated_list:"or" }}
4+
This request requires approval by the {{ approvers|comma_separated_list:"or" }}
55

66
The meeting{{ meetings|pluralize }} can be approved here:
77
{% for url in approval_urls %}{{ url }}

0 commit comments

Comments
 (0)