Automatically set the recipients of RFC5742 review emails sent by the IESG

based on the RFC Stream.
 - Legacy-Id: 3603
This commit is contained in:
Lars Eggert 2011-11-12 06:13:21 +00:00
parent a576f58aa2
commit c9bc01d8b7
3 changed files with 13 additions and 1 deletions

View file

@ -11,6 +11,8 @@ from django.core.urlresolvers import reverse as urlreverse
from ietf.utils.mail import send_mail, send_mail_text
from ietf.idtracker.models import *
from ietf.ipr.search import iprs_from_docs
from ietf.ietfworkflows.streams import (get_stream_from_draft)
from ietf.ietfworkflows.models import (Stream)
def email_state_changed(request, doc, text):
to = [x.strip() for x in doc.idinternal.state_change_notice_to.replace(';', ',').split(',')]
@ -160,6 +162,12 @@ def generate_approval_mail_rfc_editor(request, doc):
disapproved = doc.idinternal.cur_state_id in IDState.DO_NOT_PUBLISH_STATES
doc_type = "RFC" if type(doc) == Rfc else "Internet Draft"
stream = get_stream_from_draft(doc)
to = ", ".join([u"%s <%s>" % x.email() for x in stream.get_chairs_for_document(doc) ])
if stream.name == "IRTF":
# also send to the IRSG
to += ", Internet Research Steering Group (IRSG) <irsg@irtf.org>"
return render_to_string("idrfc/approval_mail_rfc_editor.txt",
dict(doc=doc,
doc_url=settings.IDTRACKER_BASE_URL + doc.idinternal.get_absolute_url(),
@ -167,6 +175,7 @@ def generate_approval_mail_rfc_editor(request, doc):
status=status,
full_status=full_status,
disapproved=disapproved,
to=to,
)
)

View file

@ -213,6 +213,9 @@ class Stream(models.Model):
delegates += [i.person for i in self.streamdelegate_set.all()]
return delegates
def _ise_chairs_for_document(self, document):
return self._ise_stream_chairs()
def _ise_stream_chairs(self):
chairs = []
try:

View file

@ -1,5 +1,5 @@
{% autoescape off %}From: The IESG <iesg-secretary@ietf.org>
To: RFC Editor <rfc-editor@rfc-editor.org>
To: {{to}}
Cc: The IESG <iesg@ietf.org>, <iana@iana.org>, <ietf-announce@ietf.org>
Subject: Results of IETF-conflict review for {{ doc.file_tag }}
{% filter wordwrap:73 %}