checkpoint
- Legacy-Id: 10007
This commit is contained in:
parent
aebd885f2b
commit
ad444bd0bc
|
@ -12,7 +12,7 @@ from ietf.ipr.utils import iprs_from_docs, related_docs
|
|||
from ietf.doc.models import WriteupDocEvent, BallotPositionDocEvent, LastCallDocEvent, DocAlias, ConsensusDocEvent, DocTagName
|
||||
from ietf.doc.utils import needed_ballot_positions
|
||||
from ietf.person.models import Person
|
||||
from ietf.group.models import Group, Role
|
||||
from ietf.group.models import Role
|
||||
from ietf.doc.models import Document
|
||||
from ietf.mailtoken.utils import gather_addresses
|
||||
|
||||
|
@ -217,27 +217,16 @@ def generate_approval_mail_rfc_editor(request, doc):
|
|||
disapproved = doc.get_state_slug("draft-iesg") in DO_NOT_PUBLISH_IESG_STATES
|
||||
doc_type = "RFC" if doc.get_state_slug() == "rfc" else "Internet Draft"
|
||||
|
||||
to = []
|
||||
if doc.group.type_id != "individ":
|
||||
for r in doc.group.role_set.filter(name="chair").select_related():
|
||||
to.append(r.formatted_email())
|
||||
|
||||
if doc.stream_id in ("ise", "irtf"):
|
||||
# include ISE/IRTF chairs
|
||||
g = Group.objects.get(acronym=doc.stream_id)
|
||||
for r in g.role_set.filter(name="chair").select_related():
|
||||
to.append(r.formatted_email())
|
||||
|
||||
if doc.stream_id == "irtf":
|
||||
# include IRSG
|
||||
to.append('"Internet Research Steering Group" <irsg@irtf.org>')
|
||||
to = gather_addresses('ballot_approved_conflrev', doc=doc)
|
||||
cc = gather_addresses('ballot_approved_conflrev_cc', doc=doc)
|
||||
|
||||
return render_to_string("doc/mail/approval_mail_rfc_editor.txt",
|
||||
dict(doc=doc,
|
||||
doc_url=settings.IDTRACKER_BASE_URL + doc.get_absolute_url(),
|
||||
doc_type=doc_type,
|
||||
disapproved=disapproved,
|
||||
to=", ".join(to),
|
||||
to=",\n ".join(to),
|
||||
cc=",\n ".join(cc),
|
||||
)
|
||||
)
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@ from ietf.doc.models import NewRevisionDocEvent, WriteupDocEvent, BallotPosition
|
|||
from ietf.person.models import Person
|
||||
from ietf.utils.history import find_history_active_at
|
||||
from ietf.utils.mail import send_mail_text
|
||||
from ietf.mailtoken.utils import gather_addresses
|
||||
|
||||
def charter_name_for_group(group):
|
||||
if group.type_id == "rg":
|
||||
|
@ -126,6 +127,8 @@ def default_action_text(group, charter, by):
|
|||
techadv=group.role_set.filter(name="techadv"),
|
||||
milestones=group.groupmilestone_set.filter(state="charter"),
|
||||
action_type=action,
|
||||
to=", ".join(gather_addresses('ballot_approved_charter',doc=charter,group=group)),
|
||||
cc=", ".join(gather_addresses('ballot_approved_charter_cc',doc=charter,group=group)),
|
||||
))
|
||||
|
||||
e.save()
|
||||
|
|
|
@ -22,6 +22,7 @@ from ietf.name.models import DocRelationshipName, StdLevelName
|
|||
from ietf.person.models import Person
|
||||
from ietf.utils.mail import send_mail_preformatted
|
||||
from ietf.utils.textupload import get_cleaned_text_file_content
|
||||
from ietf.mailtoken.utils import gather_addresses
|
||||
|
||||
class ChangeStateForm(forms.Form):
|
||||
new_state = forms.ModelChoiceField(State.objects.filter(type="statchg", used=True), label="Status Change Evaluation State", empty_label=None, required=True)
|
||||
|
@ -298,6 +299,8 @@ def default_approval_text(status_change,relateddoc):
|
|||
approved_text = current_text,
|
||||
action=action,
|
||||
newstatus=newstatus(relateddoc),
|
||||
to=", ".join(gather_addresses('ballot_approved_status_change',doc=status_change)),
|
||||
cc=", ".join(gather_addresses('ballot_approved_status_change_cc',doc=status_change)),
|
||||
)
|
||||
)
|
||||
|
||||
|
|
|
@ -45,6 +45,10 @@ def make_recipients(apps):
|
|||
desc="The chairs of groups of the subject documents of a conflict-review or status-change",
|
||||
template=None)
|
||||
|
||||
rc(slug='doc_affecteddoc_notify',
|
||||
desc="The notify field of the subject documents of a conflict-review or status-change",
|
||||
template=None)
|
||||
|
||||
rc(slug='doc_shepherd',
|
||||
desc="The document's shepherd",
|
||||
template='{% if doc.shepherd %}{{doc.shepherd.address}}{% endif %}' )
|
||||
|
@ -57,14 +61,38 @@ def make_recipients(apps):
|
|||
desc="The list address of the document's group",
|
||||
template=None )
|
||||
|
||||
rc(slug='doc_stream_owner',
|
||||
desc="The owner of the document's stream",
|
||||
template='{% if doc.stream_id == "ise" %}<rfc-ise@rfc-editor.org>{% endif %}{% if doc.stream_id == "irtf" %}<irtf-chair@irtf.org>{% endif %}{% if doc.stream_id == "ietf" %}<iesg@ietf.org>{% endif %}')
|
||||
|
||||
rc(slug='conflict_review_stream_owner',
|
||||
desc="The stream owner of a document being reviewed for IETF stream conflicts",
|
||||
template='{% ifequal doc.type_id "conflrev" %}{% ifequal doc.stream_id "ise" %}<rfc-ise@rfc-editor.org>{% endifequal %}{% ifequal doc.stream_id "irtf" %}<irtf-chair@irtf.org>{% endifequal %}{% endifequal %}')
|
||||
template = None )
|
||||
|
||||
rc(slug='conflict_review_steering_group',
|
||||
desc="The steering group (e.g. IRSG) of a document being reviewed for IETF stream conflicts",
|
||||
template = None)
|
||||
|
||||
rc(slug='iana_approve',
|
||||
desc="IANA's draft approval address",
|
||||
template='IANA <drafts-approval@icann.org>')
|
||||
|
||||
rc(slug='iana',
|
||||
desc="IANA",
|
||||
template='<iana@iana.org>')
|
||||
|
||||
rc(slug='group_mail_list',
|
||||
desc="The group's mailing list",
|
||||
template='{{ group.list_email }}')
|
||||
|
||||
rc(slug='group_steering_group',
|
||||
desc="The group's steering group (IESG or IRSG)",
|
||||
template=None)
|
||||
|
||||
rc(slug='group_chairs',
|
||||
desc="The group's chairs",
|
||||
template="{{group.acronym}}-chairs@ietf.org")
|
||||
|
||||
def make_mailtokens(apps):
|
||||
|
||||
Recipient=apps.get_model('mailtoken','Recipient')
|
||||
|
@ -85,6 +113,7 @@ def make_mailtokens(apps):
|
|||
'doc_shepherd',
|
||||
'doc_affecteddoc_authors',
|
||||
'doc_affecteddoc_group_chairs',
|
||||
'doc_affecteddoc_notify',
|
||||
'conflict_review_stream_owner',
|
||||
])
|
||||
|
||||
|
@ -98,6 +127,7 @@ def make_mailtokens(apps):
|
|||
'doc_shepherd',
|
||||
'doc_affecteddoc_authors',
|
||||
'doc_affecteddoc_group_chairs',
|
||||
'doc_affecteddoc_notify',
|
||||
'conflict_review_stream_owner',
|
||||
])
|
||||
|
||||
|
@ -121,6 +151,49 @@ def make_mailtokens(apps):
|
|||
desc='Recipients for IANA message when an IETF stream document ballot is approved',
|
||||
recipient_slugs=['iana_approve'])
|
||||
|
||||
mt_factory(slug='ballot_approved_conflrev',
|
||||
desc='Recipients when a conflict review ballot is approved',
|
||||
recipient_slugs=['conflict_review_stream_owner',
|
||||
'conflict_review_steering_group',
|
||||
'doc_affecteddoc_authors',
|
||||
'doc_affecteddoc_group_chairs',
|
||||
'doc_affecteddoc_notify',
|
||||
'doc_notify',
|
||||
])
|
||||
|
||||
mt_factory(slug='ballot_approved_conflrev_cc',
|
||||
desc='Copied when a conflict review ballot is approved',
|
||||
recipient_slugs=['iesg',
|
||||
'ietf_announce',
|
||||
'iana',
|
||||
])
|
||||
|
||||
mt_factory(slug='ballot_approved_charter',
|
||||
desc='Recipients when a charter is approved',
|
||||
recipient_slugs=['ietf_announce',])
|
||||
|
||||
mt_factory(slug='ballot_approved_charter_cc',
|
||||
desc='Copied when a charter is approved',
|
||||
recipient_slugs=['group_mail_list',
|
||||
'group_steering_group',
|
||||
'group_chairs',
|
||||
'doc_notify',
|
||||
])
|
||||
|
||||
mt_factory(slug='ballot_approved_status_change',
|
||||
desc='Recipients when a status change is approved',
|
||||
recipient_slugs=['ietf_announce',])
|
||||
|
||||
mt_factory(slug='ballot_approved_status_change_cc',
|
||||
desc='Copied when a status change is approved',
|
||||
recipient_slugs=['iesg',
|
||||
'rfc_editor',
|
||||
'doc_notify',
|
||||
'doc_affectddoc_authors',
|
||||
'doc_affecteddoc_group_chairs',
|
||||
'doc_affecteddoc_notify',
|
||||
])
|
||||
|
||||
|
||||
def forward(apps, schema_editor):
|
||||
|
||||
|
|
|
@ -67,3 +67,33 @@ class Recipient(models.Model):
|
|||
addrs.extend(Recipient.objects.get(slug='doc_group_chairs').gather(**{'doc':reldoc.document}))
|
||||
return addrs
|
||||
|
||||
def gather_doc_affecteddoc_notify(self, **kwargs):
|
||||
addrs = []
|
||||
if 'doc' in kwargs:
|
||||
for reldoc in kwargs['doc'].related_that_doc(['conflrev','tohist','tois','tops']):
|
||||
addrs.extend(Recipient.objects.get(slug='doc_notify').gather(**{'doc':reldoc.document}))
|
||||
return addrs
|
||||
|
||||
def gather_conflict_review_stream_owner(self, **kwargs):
|
||||
addrs = []
|
||||
if 'doc' in kwargs:
|
||||
for reldoc in kwargs['doc'].related_that_doc(['conflrev']):
|
||||
addrs.extend(Recipient.objects.get(slug='doc_stream_owner').gather(**{'doc':reldoc.document}))
|
||||
return addrs
|
||||
|
||||
def gather_conflict_review_steering_group(self,**kwargs):
|
||||
addrs = []
|
||||
if 'doc' in kwargs:
|
||||
for reldoc in kwargs['doc'].related_that_doc(['conflrev']):
|
||||
if reldoc.document.stream_id=='irsg':
|
||||
addrs.append('"Internet Research Steering Group" <irsg@ietf.org>')
|
||||
return addrs
|
||||
|
||||
def gather_group_steering_group(self,**kwargs):
|
||||
addrs = []
|
||||
sg_map = dict( wg='"The IESG" <iesg@ietf.org>', rg='"Internet Research Steering Group" <irsg@ietf.org>' )
|
||||
if 'group' in kwargs and kwargs['group'].type_id in sg_map:
|
||||
addrs.append(sg_map[kwargs['group'].type_id])
|
||||
return addrs
|
||||
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{% load ietf_filters %}{% autoescape off %}From: The IESG <iesg-secretary@ietf.org>
|
||||
To: IETF-Announce <ietf-announce@ietf.org>{% if group.list_email %}
|
||||
Cc: {{ group.acronym }} {{ group.type.name }} <{{ group.list_email }}> {% endif %}
|
||||
To: {{ to }}{% if cc %}
|
||||
Cc: {{ cc }} {% endif %}
|
||||
Subject: WG Action: {{ action_type }} {{ group.name }} ({{ group.acronym }})
|
||||
|
||||
{% filter wordwrap:73 %}{% if action_type == "Formed" %}A new IETF working group has been formed in the {{ group.parent.name }}.{% endif %}{% if action_type == "Rechartered" %}The {{ group.name }} ({{ group.acronym }}) working group in the {{ group.parent.name }} of the IETF has been rechartered.{% endif %} For additional information please contact the Area Directors or the {{ group.type.name }} Chair{{ chairs|pluralize}}.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{% load mail_filters %}{% autoescape off %}From: The IESG <iesg-secretary@ietf.org>
|
||||
To: {{to}}
|
||||
Cc: The IESG <iesg@ietf.org>, <iana@iana.org>, <ietf-announce@ietf.org>
|
||||
Cc: {{cc}}
|
||||
Subject: Results of IETF-conflict review for {{ doc.file_tag }}
|
||||
{% filter wordwrap:73 %}
|
||||
The IESG has completed a review of <{{ doc.name }}> consistent with RFC5742. This review is applied to all non-IETF streams.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{% load mail_filters %}{% autoescape off %}From: The IESG <iesg-secretary@ietf.org>
|
||||
To: IETF-Announce <ietf-announce@ietf.org>
|
||||
Cc: RFC Editor <rfc-editor@rfc-editor.org>, {{status_change.notify}}
|
||||
To: {{ to }}{% if cc %}
|
||||
Cc: {{ cc }}{% endif %}
|
||||
Subject: {{action}}: {{relateddoc.target.document.title}} to {{newstatus}}
|
||||
|
||||
{% filter wordwrap:73 %}The IESG has approved changing the status of the following document:
|
||||
|
|
|
@ -335,7 +335,7 @@ def make_test_data():
|
|||
# This won't allow testing the results of the production configuration - if we want to do that, we'll need to
|
||||
# extract the production data either directly, or as a fixture
|
||||
recipient = Recipient.objects.create(slug='bogus_recipient',desc='Bogus Recipient',template='bogus@example.com')
|
||||
for slug in [u'ballot_approved_ietf_stream', u'ballot_approved_ietf_stream_cc', u'ballot_approved_ietf_stream_iana', u'ballot_deferred', u'ballot_saved', u'ballot_saved_cc']:
|
||||
for slug in [u'ballot_approved_charter', u'ballot_approved_charter_cc', u'ballot_approved_conflrev', u'ballot_approved_conflrev_cc', u'ballot_approved_ietf_stream', u'ballot_approved_ietf_stream_cc', u'ballot_approved_ietf_stream_iana', u'ballot_approved_status_change', u'ballot_approved_status_change_cc', u'ballot_deferred', u'ballot_saved', u'ballot_saved_cc']:
|
||||
m = MailToken.objects.create(slug=slug,desc=slug)
|
||||
m.recipients=[recipient]
|
||||
|
||||
|
|
Loading…
Reference in a new issue