Skip to content

Commit 15538de

Browse files
committed
checkpoint
- Legacy-Id: 10010
1 parent 6c85bc5 commit 15538de

5 files changed

Lines changed: 59 additions & 17 deletions

File tree

ietf/doc/mails.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -412,18 +412,18 @@ def extra_automation_headers(doc):
412412
def email_last_call_expired(doc):
413413
text = "IETF Last Call has ended, and the state has been changed to\n%s." % doc.get_state("draft-iesg").name
414414

415-
to = [x.strip() for x in doc.notify.replace(';', ',').split(',')]
416-
to.insert(0, "iesg@ietf.org")
415+
to = gather_addresses('last_call_expired',doc=doc)
416+
cc = gather_addresses('last_call_expired_cc',doc=doc)
417417

418418
send_mail(None,
419-
to,
419+
",\n ".join(to),
420420
"DraftTracker Mail System <iesg-secretary@ietf.org>",
421421
"Last Call Expired: %s" % doc.file_tag(),
422422
"doc/mail/change_notice.txt",
423423
dict(text=text,
424424
doc=doc,
425425
url=settings.IDTRACKER_BASE_URL + doc.get_absolute_url()),
426-
cc="iesg-secretary@ietf.org")
426+
cc=",\n ".join(cc))
427427

428428
def stream_state_email_recipients(doc, extra_recipients=[]):
429429
persons = set()

ietf/doc/views_ballot.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -758,7 +758,8 @@ def make_last_call(request, name):
758758
send_mail_preformatted(request, announcement)
759759
if doc.type.slug == 'draft':
760760
send_mail_preformatted(request, announcement, extra=extra_automation_headers(doc),
761-
override={ "To": "IANA <drafts-lastcall@icann.org>", "CC": None, "Bcc": None, "Reply-To": None})
761+
override={ "To": ",\n ".join(gather_addresses('last_call_issued_iana',doc=doc)),
762+
"CC": None, "Bcc": None, "Reply-To": None})
762763

763764
msg = infer_message(announcement)
764765
msg.by = login

ietf/doc/views_draft.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -583,9 +583,9 @@ def to_iesg(request,name):
583583
doc.save()
584584

585585
extra = {}
586-
extra['Cc'] = "%s-chairs@tools.ietf.org, iesg-secretary@ietf.org, %s" % (doc.group.acronym,doc.notify)
586+
extra['Cc'] = ",\n ".join(gather_addresses('pubreq_iesg_cc',doc=doc))
587587
send_mail(request=request,
588-
to = doc.ad.email_address(),
588+
to = ",\n ".join(gather_addresses('pubreq_iesg',doc=doc)),
589589
frm = login.formatted_email(),
590590
subject = "Publication has been requested for %s-%s" % (doc.name,doc.rev),
591591
template = "doc/submit_to_iesg_email.txt",
@@ -1133,7 +1133,7 @@ def request_publication(request, name):
11331133

11341134
m = Message()
11351135
m.frm = request.user.person.formatted_email()
1136-
m.to = "RFC Editor <rfc-editor@rfc-editor.org>"
1136+
m.to = ",\n ".join(gather_addresses('pubreq_rfced',doc=doc))
11371137
m.by = request.user.person
11381138

11391139
next_state = State.objects.get(used=True, type="draft-stream-%s" % doc.stream.slug, slug="rfc-edit")
@@ -1163,7 +1163,7 @@ def request_publication(request, name):
11631163
send_mail_message(request, m)
11641164

11651165
# IANA copy
1166-
m.to = ",".join(gather_addresses('ballot_approved_ietf_stream_iana'))
1166+
m.to = ", ".join(gather_addresses('pubreq_rfced_iana',doc=doc))
11671167
send_mail_message(request, m, extra=extra_automation_headers(doc))
11681168

11691169
e = DocEvent(doc=doc, type="requested_publication", by=request.user.person)

ietf/mailtoken/migrations/0002_auto_20150809_1314.py

Lines changed: 48 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,12 @@ def make_recipients(apps):
6161
desc="The list address of the document's group",
6262
template=None )
6363

64-
rc(slug='doc_stream_owner',
65-
desc="The owner of the document's stream",
64+
rc(slug='doc_stream_manager',
65+
desc="The manager of the document's stream",
6666
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 %}')
6767

68-
rc(slug='conflict_review_stream_owner',
69-
desc="The stream owner of a document being reviewed for IETF stream conflicts",
68+
rc(slug='conflict_review_stream_manager',
69+
desc="The stream manager of a document being reviewed for IETF stream conflicts",
7070
template = None )
7171

7272
rc(slug='conflict_review_steering_group',
@@ -77,6 +77,10 @@ def make_recipients(apps):
7777
desc="IANA's draft approval address",
7878
template='IANA <drafts-approval@icann.org>')
7979

80+
rc(slug='iana_last_call',
81+
desc="IANA's draft last call address",
82+
template='IANA <drafts-lastcall@icann.org>')
83+
8084
rc(slug='iana',
8185
desc="IANA",
8286
template='<iana@iana.org>')
@@ -114,7 +118,7 @@ def mt_factory(slug,desc,recipient_slugs):
114118
'doc_affecteddoc_authors',
115119
'doc_affecteddoc_group_chairs',
116120
'doc_affecteddoc_notify',
117-
'conflict_review_stream_owner',
121+
'conflict_review_stream_manager',
118122
])
119123

120124
mt_factory(slug='ballot_deferred',
@@ -128,7 +132,7 @@ def mt_factory(slug,desc,recipient_slugs):
128132
'doc_affecteddoc_authors',
129133
'doc_affecteddoc_group_chairs',
130134
'doc_affecteddoc_notify',
131-
'conflict_review_stream_owner',
135+
'conflict_review_stream_manager',
132136
])
133137

134138
mt_factory(slug='ballot_approved_ietf_stream',
@@ -153,7 +157,7 @@ def mt_factory(slug,desc,recipient_slugs):
153157

154158
mt_factory(slug='ballot_approved_conflrev',
155159
desc='Recipients when a conflict review ballot is approved',
156-
recipient_slugs=['conflict_review_stream_owner',
160+
recipient_slugs=['conflict_review_stream_manager',
157161
'conflict_review_steering_group',
158162
'doc_affecteddoc_authors',
159163
'doc_affecteddoc_group_chairs',
@@ -220,6 +224,43 @@ def mt_factory(slug,desc,recipient_slugs):
220224
'doc_affecteddoc_group_chairs',
221225
'doc_affecteddoc_notify'])
222226

227+
mt_factory(slug='last_call_issued_iana',
228+
desc='Recipients for IANA message when a last call is issued',
229+
recipient_slugs=['iana_last_call'])
230+
231+
mt_factory(slug='last_call_expired',
232+
desc='Recipients when a last call has expired',
233+
recipient_slugs=['iesg',
234+
'doc_notify',
235+
'doc_authors',
236+
'doc_shepherd',
237+
])
238+
239+
mt_factory(slug='last_call_expired_cc',
240+
desc='Copied when a last call has expired',
241+
recipient_slugs=['iesg_secretary',])
242+
243+
mt_factory(slug='pubreq_iesg',
244+
desc='Recipients when a draft is submitted to the IESG',
245+
recipient_slugs=['doc_ad',])
246+
247+
mt_factory(slug='pubreq_iesg_cc',
248+
desc='Copied when a draft is submitted to the IESG',
249+
recipient_slugs=['iesg_secretary',
250+
'doc_notify',
251+
'doc_shepherd',
252+
'doc_group_chairs',
253+
])
254+
255+
mt_factory(slug='pubreq_rfced',
256+
desc='Recipients when a non-IETF stream manager requests publication',
257+
recipient_slugs=['rfc_editor',
258+
])
259+
260+
mt_factory(slug='pubreq_rfced_iana',
261+
desc='Recipients for IANA message when a non-IETF stream manager requests publication',
262+
recipient_slugs=['iana_approve',])
263+
223264
def forward(apps, schema_editor):
224265

225266
make_recipients(apps)

ietf/utils/test_data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ def other_doc_factory(type_id,name):
335335
# This won't allow testing the results of the production configuration - if we want to do that, we'll need to
336336
# extract the production data either directly, or as a fixture
337337
recipient = Recipient.objects.create(slug='bogus_recipient',desc='Bogus Recipient',template='bogus@example.com')
338-
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', u'last_call_issued', u'last_call_issued_cc', u'last_call_requested', u'last_call_requested_cc']:
338+
for slug in ['ballot_approved_charter', 'ballot_approved_charter_cc', 'ballot_approved_conflrev', 'ballot_approved_conflrev_cc', 'ballot_approved_ietf_stream', 'ballot_approved_ietf_stream_cc', 'ballot_approved_ietf_stream_iana', 'ballot_approved_status_change', 'ballot_approved_status_change_cc', 'ballot_deferred', 'ballot_saved', 'ballot_saved_cc', 'last_call_expired', 'last_call_expired_cc', 'last_call_issued', 'last_call_issued_cc', 'last_call_issued_iana', 'last_call_requested', 'last_call_requested_cc', 'pubreq_iesg', 'pubreq_iesg_cc', 'pubreq_rfced', 'pubreq_rfced_iana']:
339339
m = MailToken.objects.create(slug=slug,desc=slug)
340340
m.recipients=[recipient]
341341

0 commit comments

Comments
 (0)