Make internal review email about an RG use the IRSG instead of the IESG in text and addresses. Fixes #2881. Commit ready for merge.
- Legacy-Id: 17288
This commit is contained in:
parent
3568e72ec5
commit
4cce1b5e08
|
@ -1,4 +1,4 @@
|
|||
# Copyright The IETF Trust 2010-2019, All Rights Reserved
|
||||
# Copyright The IETF Trust 2010-2020, All Rights Reserved
|
||||
# -*- coding: utf-8 -*-
|
||||
# generation of mails
|
||||
|
||||
|
@ -542,5 +542,5 @@ def email_charter_internal_review(request, charter):
|
|||
milestones=charter.group.groupmilestone_set.filter(state="charter"),
|
||||
),
|
||||
cc=addrs.cc,
|
||||
extra={'Reply-To': ["iesg@ietf.org", ]},
|
||||
extra={'Reply-To': ["irsg@irtf.org" if charter.group.type_id == 'rg' else "iesg@ietf.org", ]},
|
||||
)
|
||||
|
|
|
@ -228,6 +228,44 @@ class EditCharterTests(TestCase):
|
|||
self.assertEqual(r.status_code, 302)
|
||||
self.assertTrue("A new charter" in get_payload(outbox[-3]))
|
||||
|
||||
def test_change_rg_state(self):
|
||||
|
||||
irtf = Group.objects.get(acronym='irtf')
|
||||
|
||||
group = GroupFactory(acronym='somerg', type_id='rg', state_id='proposed',list_email='somerg@ietf.org',parent=irtf)
|
||||
charter = CharterFactory(group=group)
|
||||
|
||||
url = urlreverse('ietf.doc.views_charter.change_state', kwargs=dict(name=charter.name))
|
||||
login_testing_unauthorized(self, "secretary", url)
|
||||
|
||||
s = State.objects.get(used=True, type="charter", slug="intrev")
|
||||
empty_outbox()
|
||||
|
||||
r = self.client.post(url, dict(charter_state=str(s.pk), message="test message"))
|
||||
self.assertEqual(r.status_code, 302)
|
||||
|
||||
self.assertIn("Internal RG Review", outbox[-3]['Subject'])
|
||||
self.assertIn("iab@", outbox[-3]['To'])
|
||||
self.assertIn("irsg@", outbox[-3]['To'])
|
||||
body = get_payload(outbox[-3])
|
||||
for word in ["A new IRTF RG",
|
||||
"Mailing list", "somerg@ietf.org",
|
||||
"Charter", "Milestones"]:
|
||||
|
||||
self.assertIn(word, body)
|
||||
|
||||
self.assertIn("state changed", outbox[-2]['Subject'].lower())
|
||||
self.assertIn("iesg-secretary@", outbox[-2]['To'])
|
||||
body = get_payload(outbox[-2])
|
||||
for word in ["RG", "Charter", ]:
|
||||
self.assertIn(word, body)
|
||||
|
||||
self.assertIn("State Update Notice", outbox[-1]['Subject'])
|
||||
self.assertIn("somerg-chairs@", outbox[-1]['To'])
|
||||
body = get_payload(outbox[-1])
|
||||
for word in ["State changed", "Datatracker URL", ]:
|
||||
self.assertIn(word, body)
|
||||
|
||||
def test_abandon_bof(self):
|
||||
charter = CharterFactory(group__state_id='bof',group__type_id='wg')
|
||||
url = urlreverse('ietf.doc.views_charter.change_state',kwargs={'name':charter.name,'option':'abandon'})
|
||||
|
@ -575,6 +613,41 @@ class EditCharterTests(TestCase):
|
|||
self.assertTrue(group.name in charter.latest_event(WriteupDocEvent, type="changed_review_announcement").text)
|
||||
self.assertTrue(charter.group.name in charter.latest_event(WriteupDocEvent, type="changed_new_work_text").text)
|
||||
|
||||
def test_rg_edit_review_announcement_text(self):
|
||||
irtf = Group.objects.get(acronym='irtf')
|
||||
charter = CharterFactory(
|
||||
group__acronym = 'somerg',
|
||||
group__type_id = 'rg',
|
||||
group__list_email = 'somerg@ietf.org',
|
||||
group__parent = irtf,
|
||||
)
|
||||
group = charter.group
|
||||
|
||||
url = urlreverse('ietf.doc.views_charter.review_announcement_text', kwargs=dict(name=charter.name))
|
||||
self.client.logout()
|
||||
login_testing_unauthorized(self, "secretary", url)
|
||||
|
||||
by = Person.objects.get(user__username="secretary")
|
||||
(e1, e2) = default_review_text(group, charter, by)
|
||||
announcement_text = e1.text
|
||||
new_work_text = e2.text
|
||||
|
||||
empty_outbox()
|
||||
r = self.client.post(url, dict(
|
||||
announcement_text=announcement_text,
|
||||
new_work_text=new_work_text,
|
||||
send_both="1"))
|
||||
self.assertEqual(r.status_code, 302)
|
||||
self.assertEqual(len(outbox), 2)
|
||||
self.assertTrue(all(['RG Review' in m['Subject'] for m in outbox]))
|
||||
self.assertTrue('ietf-announce@' in outbox[0]['To'])
|
||||
self.assertTrue('somerg@' in outbox[0]['Cc'])
|
||||
self.assertTrue('new-work@' in outbox[1]['To'])
|
||||
self.assertIsNotNone(outbox[0]['Reply-To'])
|
||||
self.assertIsNotNone(outbox[1]['Reply-To'])
|
||||
self.assertTrue('irsg@irtf.org' in outbox[0]['Reply-To'])
|
||||
self.assertTrue('irsg@irtf.org' in outbox[1]['Reply-To'])
|
||||
|
||||
def test_edit_action_announcement_text(self):
|
||||
area = GroupFactory(type_id='area')
|
||||
RoleFactory(name_id='ad',group=area,person=Person.objects.get(user__username='ad'))
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,7 +1,7 @@
|
|||
{% load ietf_filters %}{% autoescape off %}From: The IESG <iesg-secretary@ietf.org>
|
||||
To: {{ to }}{% if cc %}
|
||||
Cc: {{ cc }} {% endif %}
|
||||
Reply-To: iesg@ietf.org
|
||||
Reply-To: {% if group.type_id == "rg" %}irsg@irtf.org{% else %}iesg@ietf.org{% endif %}
|
||||
Subject: {{ group.type.name }} Review: {{ group.name }} ({{ group.acronym }})
|
||||
|
||||
{% filter wordwrap:78 %}{% if review_type == "new" %}A new {% if group.type_id == "rg" %}IRTF{% else %}IETF{% endif %} {{ group.type.name }} has been proposed in the {{ group.parent.name }}.{% elif review_type == "recharter" %}The {{ group.name }} ({{group.acronym}}) {{ group.type.name }} in the {{ group.parent.name }} of the {% if group.type_id == "rg" %}IRTF{% else %}IETF{% endif %} is undergoing rechartering.{% endif %} The {% if group.type_id == "rg" %}IRSG{% else %}IESG{% endif %} has not made any determination yet. The following draft charter was submitted, and is provided for informational purposes only. Please send your comments to the {% if group.type_id == "rg" %}IRSG{% else %}IESG{% endif %} mailing list ({% if group.type_id == "rg" %}irsg@irtf.org{% else %}iesg@ietf.org{% endif %}) by {{ review_date }}.
|
||||
|
|
Loading…
Reference in a new issue