Skip to content

Commit

Permalink
Make the internal review message reflect whether this is a new charte…
Browse files Browse the repository at this point in the history
…ring effort or a recharter. Fixes #1814. Commit ready to merge.

 - Legacy-Id: 10378
  • Loading branch information
rjsparks committed Nov 3, 2015
1 parent 262ad86 commit ff93fe3
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions ietf/doc/mails.py
Expand Up @@ -473,6 +473,7 @@ def email_charter_internal_review(request, charter):
ads=charter.group.role_set.filter(name='ad').values_list('person__name',flat=True),
charter_text=charter_text,
milestones=charter.group.groupmilestone_set.filter(state="charter"),
review_type = "new" if charter.group.state_id == "proposed" else "recharter",
),
cc=addrs.cc,
extra={'Reply-To':"iesg@ietf.org"},
Expand Down
10 changes: 10 additions & 0 deletions ietf/doc/tests_charter.py
Expand Up @@ -102,12 +102,22 @@ def find_event(t):
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 unicode(outbox[-3]))

self.assertTrue("state changed" in outbox[-2]['Subject'].lower())
self.assertTrue("iesg-secretary@" in outbox[-2]['To'])

self.assertTrue("State Update Notice" in outbox[-1]['Subject'])
self.assertTrue("ames-chairs@" in outbox[-1]['To'])

# Exercise internal review of a recharter
group = Group.objects.get(acronym="mars")
charter = group.charter
url = urlreverse('charter_change_state', kwargs=dict(name=charter.name))
empty_outbox()
r = self.client.post(url, dict(charter_state=str(State.objects.get(used=True,type="charter",slug="intrev").pk), message="test"))
self.assertEqual(r.status_code, 302)
self.assertTrue("A new charter" in unicode(outbox[-3]))

def test_edit_telechat_date(self):
make_test_data()
Expand Down
2 changes: 1 addition & 1 deletion ietf/templates/doc/mail/charter_internal_review.txt
@@ -1,6 +1,6 @@
{% autoescape off %}{% filter wordwrap:73 %}

A new IETF working group is being considered in the {{charter.group.parent.name}}. The draft charter for this working group is provided below for your review and comment.
{% 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.

Review time is one week.

Expand Down

0 comments on commit ff93fe3

Please sign in to comment.