Skip to content

Commit 03c6207

Browse files
committed
Merged [3603] from lars.eggert@nokia.com:
Automatically set the recipients of RFC5742 review emails sent by the IESG based on the RFC Stream. - Legacy-Id: 3610 Note: SVN reference [3603] has been migrated to Git commit c9bc01d
2 parents 8a958c9 + c9bc01d commit 03c6207

3 files changed

Lines changed: 13 additions & 1 deletion

File tree

ietf/idrfc/mails.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
from ietf.utils.mail import send_mail, send_mail_text
1212
from ietf.idtracker.models import *
1313
from ietf.ipr.search import iprs_from_docs
14+
from ietf.ietfworkflows.streams import (get_stream_from_draft)
15+
from ietf.ietfworkflows.models import (Stream)
1416

1517
def email_state_changed(request, doc, text):
1618
to = [x.strip() for x in doc.idinternal.state_change_notice_to.replace(';', ',').split(',')]
@@ -160,13 +162,20 @@ def generate_approval_mail_rfc_editor(request, doc):
160162
disapproved = doc.idinternal.cur_state_id in IDState.DO_NOT_PUBLISH_STATES
161163
doc_type = "RFC" if type(doc) == Rfc else "Internet Draft"
162164

165+
stream = get_stream_from_draft(doc)
166+
to = ", ".join([u"%s <%s>" % x.email() for x in stream.get_chairs_for_document(doc) ])
167+
if stream.name == "IRTF":
168+
# also send to the IRSG
169+
to += ", Internet Research Steering Group (IRSG) <irsg@irtf.org>"
170+
163171
return render_to_string("idrfc/approval_mail_rfc_editor.txt",
164172
dict(doc=doc,
165173
doc_url=settings.IDTRACKER_BASE_URL + doc.idinternal.get_absolute_url(),
166174
doc_type=doc_type,
167175
status=status,
168176
full_status=full_status,
169177
disapproved=disapproved,
178+
to=to,
170179
)
171180
)
172181

ietf/ietfworkflows/models.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,9 @@ def get_delegates_for_document(self, document):
213213
delegates += [i.person for i in self.streamdelegate_set.all()]
214214
return delegates
215215

216+
def _ise_chairs_for_document(self, document):
217+
return self._ise_stream_chairs()
218+
216219
def _ise_stream_chairs(self):
217220
chairs = []
218221
try:

ietf/templates/idrfc/approval_mail_rfc_editor.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{% autoescape off %}From: The IESG <iesg-secretary@ietf.org>
2-
To: RFC Editor <rfc-editor@rfc-editor.org>
2+
To: {{to}}
33
Cc: The IESG <iesg@ietf.org>, <iana@iana.org>, <ietf-announce@ietf.org>
44
Subject: Results of IETF-conflict review for {{ doc.file_tag }}
55
{% filter wordwrap:73 %}

0 commit comments

Comments
 (0)