Merged in [17288] from rjsparks@nostrum.com:

Make internal review email about an RG use the IRSG instead of the IESG in text and addresses. Fixes #2881.
 - Legacy-Id: 17307
Note: SVN reference [17288] has been migrated to Git commit 4cce1b5e08
This commit is contained in:
Henrik Levkowetz 2020-02-18 22:04:15 +00:00
commit ab34ecbb58
4 changed files with 85 additions and 12 deletions

View file

@ -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", ]},
)

View file

@ -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'))

View file

@ -1309,7 +1309,7 @@
{
"fields": {
"desc": "This is the state when you'd like to propose the charter / new charter. This state also allows you to ask whether external review can be skipped in ballot. After you select this state, the Secretariat takes over and drives the rest of the process.",
"name": "Start Chartering/Rechartering (Internal IESG/IAB Review)",
"name": "Start Chartering/Rechartering (Internal Steering Group/IAB Review)",
"next_states": [],
"order": 0,
"slug": "intrev",
@ -3281,8 +3281,8 @@
"cc": [],
"desc": "Recipients for message noting that internal review has started on a charter",
"to": [
"iab",
"iesg"
"group_steering_group",
"iab"
]
},
"model": "mailtrigger.mailtrigger",
@ -14226,7 +14226,7 @@
"fields": {
"command": "xym",
"switch": "--version",
"time": "2020-01-09T00:13:22.771",
"time": "2020-01-16T00:12:27.984",
"used": true,
"version": "xym 0.4"
},
@ -14237,9 +14237,9 @@
"fields": {
"command": "pyang",
"switch": "--version",
"time": "2020-01-09T00:13:23.631",
"time": "2020-01-16T00:12:29.007",
"used": true,
"version": "pyang 2.1"
"version": "pyang 2.1.1"
},
"model": "utils.versioninfo",
"pk": 2
@ -14248,7 +14248,7 @@
"fields": {
"command": "yanglint",
"switch": "--version",
"time": "2020-01-09T00:13:23.912",
"time": "2020-01-16T00:12:29.206",
"used": true,
"version": "yanglint 0.14.80"
},
@ -14259,9 +14259,9 @@
"fields": {
"command": "xml2rfc",
"switch": "--version",
"time": "2020-01-09T00:13:24.917",
"time": "2020-01-16T00:12:30.657",
"used": true,
"version": "xml2rfc 2.37.2"
"version": "xml2rfc 2.37.3"
},
"model": "utils.versioninfo",
"pk": 4

View file

@ -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 }}.