checkpoint

- Legacy-Id: 10010
This commit is contained in:
Robert Sparks 2015-08-11 17:26:53 +00:00
parent 6c85bc558c
commit 15538ded7e
5 changed files with 59 additions and 17 deletions

View file

@ -412,18 +412,18 @@ def extra_automation_headers(doc):
def email_last_call_expired(doc):
text = "IETF Last Call has ended, and the state has been changed to\n%s." % doc.get_state("draft-iesg").name
to = [x.strip() for x in doc.notify.replace(';', ',').split(',')]
to.insert(0, "iesg@ietf.org")
to = gather_addresses('last_call_expired',doc=doc)
cc = gather_addresses('last_call_expired_cc',doc=doc)
send_mail(None,
to,
",\n ".join(to),
"DraftTracker Mail System <iesg-secretary@ietf.org>",
"Last Call Expired: %s" % doc.file_tag(),
"doc/mail/change_notice.txt",
dict(text=text,
doc=doc,
url=settings.IDTRACKER_BASE_URL + doc.get_absolute_url()),
cc="iesg-secretary@ietf.org")
cc=",\n ".join(cc))
def stream_state_email_recipients(doc, extra_recipients=[]):
persons = set()

View file

@ -758,7 +758,8 @@ def make_last_call(request, name):
send_mail_preformatted(request, announcement)
if doc.type.slug == 'draft':
send_mail_preformatted(request, announcement, extra=extra_automation_headers(doc),
override={ "To": "IANA <drafts-lastcall@icann.org>", "CC": None, "Bcc": None, "Reply-To": None})
override={ "To": ",\n ".join(gather_addresses('last_call_issued_iana',doc=doc)),
"CC": None, "Bcc": None, "Reply-To": None})
msg = infer_message(announcement)
msg.by = login

View file

@ -583,9 +583,9 @@ def to_iesg(request,name):
doc.save()
extra = {}
extra['Cc'] = "%s-chairs@tools.ietf.org, iesg-secretary@ietf.org, %s" % (doc.group.acronym,doc.notify)
extra['Cc'] = ",\n ".join(gather_addresses('pubreq_iesg_cc',doc=doc))
send_mail(request=request,
to = doc.ad.email_address(),
to = ",\n ".join(gather_addresses('pubreq_iesg',doc=doc)),
frm = login.formatted_email(),
subject = "Publication has been requested for %s-%s" % (doc.name,doc.rev),
template = "doc/submit_to_iesg_email.txt",
@ -1133,7 +1133,7 @@ def request_publication(request, name):
m = Message()
m.frm = request.user.person.formatted_email()
m.to = "RFC Editor <rfc-editor@rfc-editor.org>"
m.to = ",\n ".join(gather_addresses('pubreq_rfced',doc=doc))
m.by = request.user.person
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):
send_mail_message(request, m)
# IANA copy
m.to = ",".join(gather_addresses('ballot_approved_ietf_stream_iana'))
m.to = ", ".join(gather_addresses('pubreq_rfced_iana',doc=doc))
send_mail_message(request, m, extra=extra_automation_headers(doc))
e = DocEvent(doc=doc, type="requested_publication", by=request.user.person)

View file

@ -61,12 +61,12 @@ 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",
rc(slug='doc_stream_manager',
desc="The manager 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",
rc(slug='conflict_review_stream_manager',
desc="The stream manager of a document being reviewed for IETF stream conflicts",
template = None )
rc(slug='conflict_review_steering_group',
@ -77,6 +77,10 @@ def make_recipients(apps):
desc="IANA's draft approval address",
template='IANA <drafts-approval@icann.org>')
rc(slug='iana_last_call',
desc="IANA's draft last call address",
template='IANA <drafts-lastcall@icann.org>')
rc(slug='iana',
desc="IANA",
template='<iana@iana.org>')
@ -114,7 +118,7 @@ def make_mailtokens(apps):
'doc_affecteddoc_authors',
'doc_affecteddoc_group_chairs',
'doc_affecteddoc_notify',
'conflict_review_stream_owner',
'conflict_review_stream_manager',
])
mt_factory(slug='ballot_deferred',
@ -128,7 +132,7 @@ def make_mailtokens(apps):
'doc_affecteddoc_authors',
'doc_affecteddoc_group_chairs',
'doc_affecteddoc_notify',
'conflict_review_stream_owner',
'conflict_review_stream_manager',
])
mt_factory(slug='ballot_approved_ietf_stream',
@ -153,7 +157,7 @@ def make_mailtokens(apps):
mt_factory(slug='ballot_approved_conflrev',
desc='Recipients when a conflict review ballot is approved',
recipient_slugs=['conflict_review_stream_owner',
recipient_slugs=['conflict_review_stream_manager',
'conflict_review_steering_group',
'doc_affecteddoc_authors',
'doc_affecteddoc_group_chairs',
@ -220,6 +224,43 @@ def make_mailtokens(apps):
'doc_affecteddoc_group_chairs',
'doc_affecteddoc_notify'])
mt_factory(slug='last_call_issued_iana',
desc='Recipients for IANA message when a last call is issued',
recipient_slugs=['iana_last_call'])
mt_factory(slug='last_call_expired',
desc='Recipients when a last call has expired',
recipient_slugs=['iesg',
'doc_notify',
'doc_authors',
'doc_shepherd',
])
mt_factory(slug='last_call_expired_cc',
desc='Copied when a last call has expired',
recipient_slugs=['iesg_secretary',])
mt_factory(slug='pubreq_iesg',
desc='Recipients when a draft is submitted to the IESG',
recipient_slugs=['doc_ad',])
mt_factory(slug='pubreq_iesg_cc',
desc='Copied when a draft is submitted to the IESG',
recipient_slugs=['iesg_secretary',
'doc_notify',
'doc_shepherd',
'doc_group_chairs',
])
mt_factory(slug='pubreq_rfced',
desc='Recipients when a non-IETF stream manager requests publication',
recipient_slugs=['rfc_editor',
])
mt_factory(slug='pubreq_rfced_iana',
desc='Recipients for IANA message when a non-IETF stream manager requests publication',
recipient_slugs=['iana_approve',])
def forward(apps, schema_editor):
make_recipients(apps)

View file

@ -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_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']:
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']:
m = MailToken.objects.create(slug=slug,desc=slug)
m.recipients=[recipient]