fix: send status change eval and lc to IANA. Fixes #3504. (#4244)

This commit is contained in:
Robert Sparks 2022-07-23 12:36:00 -05:00 committed by GitHub
parent 57e729cdc3
commit de4f1feed2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 21 additions and 20 deletions

View file

@ -49,7 +49,7 @@ from ietf.meeting.factories import ( MeetingFactory, SessionFactory, SessionPres
from ietf.name.models import SessionStatusName, BallotPositionName, DocTypeName
from ietf.person.models import Person
from ietf.person.factories import PersonFactory, EmailFactory
from ietf.utils.mail import outbox
from ietf.utils.mail import outbox, empty_outbox
from ietf.utils.test_utils import login_testing_unauthorized, unicontent, reload_db_objects
from ietf.utils.test_utils import TestCase
from ietf.utils.text import normalize_text
@ -1665,11 +1665,15 @@ class DocTestCase(TestCase):
DocAlias.objects.create(name='rfc9999').docs.add(IndividualDraftFactory())
doc = DocumentFactory(type_id='statchg',name='status-change-imaginary-mid-review')
iesgeval_pk = str(State.objects.get(slug='iesgeval',type__slug='statchg').pk)
empty_outbox()
self.client.login(username='ad', password='ad+password')
r = self.client.post(urlreverse('ietf.doc.views_status_change.change_state',kwargs=dict(name=doc.name)),dict(new_state=iesgeval_pk))
self.assertEqual(r.status_code, 302)
r = self.client.get(r._headers["location"][1])
self.assertContains(r, ">IESG Evaluation<")
self.assertEqual(len(outbox), 2)
self.assertIn('iesg-secretary',outbox[0]['To'])
self.assertIn('drafts-eval',outbox[1]['To'])
doc.relateddocument_set.create(target=DocAlias.objects.get(name='rfc9998'),relationship_id='tohist')
r = self.client.get(urlreverse("ietf.doc.views_doc.document_ballot", kwargs=dict(name=doc.name)))

View file

@ -679,9 +679,7 @@ def ballot_writeupnotes(request, name):
send_mail_preformatted(request, msg, override=override)
addrs = gather_address_lists('ballot_issued_iana',doc=doc).as_strings()
override={ "To": "IANA <%s>"%settings.IANA_EVAL_EMAIL, "Bcc": None , "Reply-To": []}
if addrs.cc:
override['CC'] = addrs.cc
override={ "To": addrs.to, "Bcc": None , "Reply-To": [], "CC": addrs.cc or None }
send_mail_preformatted(request, msg, extra=extra_automation_headers(doc), override=override)
e = DocEvent(doc=doc, rev=doc.rev, by=login)
@ -1031,7 +1029,7 @@ def make_last_call(request, name):
announcement_event.save()
send_mail_preformatted(request, announcement)
if doc.type.slug == 'draft':
if doc.type.slug in ("draft", "statchg"):
addrs = gather_address_lists('last_call_issued_iana',doc=doc).as_strings(compact=False)
send_mail_preformatted(request, announcement, extra=extra_automation_headers(doc),
override={ "To": addrs.to, "CC": addrs.cc, "Bcc": None, "Reply-To": []})
@ -1206,4 +1204,4 @@ def irsg_ballot_status(request):
docs.append(doc)
return render(request, 'doc/irsg_ballot_status.html', {'docs':docs})
return render(request, 'doc/irsg_ballot_status.html', {'docs':docs})

View file

@ -125,16 +125,16 @@ def change_state(request, name, option=None):
))
def send_status_change_eval_email(request,doc):
msg = render_to_string("doc/eval_email.txt",
dict(doc=doc,
doc_url = settings.IDTRACKER_BASE_URL+doc.get_absolute_url(),
)
)
addrs = gather_address_lists('iesg_ballot_issued',doc=doc)
override = {'To':addrs.to }
if addrs.cc:
override['Cc'] = addrs.cc
send_mail_preformatted(request,msg,override=override)
for target in ('iesg_ballot_issued', 'ballot_issued_iana'):
addrs = gather_address_lists(target,doc=doc).as_strings()
msg = render_to_string("doc/eval_email.txt",
dict(doc=doc,
doc_url = settings.IDTRACKER_BASE_URL+doc.get_absolute_url(),
to = addrs.to,
cc = addrs.cc
)
)
send_mail_preformatted(request,msg)
class UploadForm(forms.Form):
content = forms.CharField(widget=forms.Textarea, label="Status change text", help_text="Edit the status change text.", required=False, strip=False)

View file

@ -760,7 +760,6 @@ PDFIZER_URL_PREFIX = IDTRACKER_BASE_URL+"/doc/pdf"
# Email settings
IPR_EMAIL_FROM = 'ietf-ipr@ietf.org'
AUDIO_IMPORT_EMAIL = ['ietf@meetecho.com']
IANA_EVAL_EMAIL = "drafts-eval@icann.org"
SESSION_REQUEST_FROM_EMAIL = 'IETF Meeting Session Request Tool <session-request@ietf.org>'
SECRETARIAT_SUPPORT_EMAIL = "support@ietf.org"

View file

@ -1,6 +1,6 @@
{% load mail_filters %}{% autoescape off %}To: {{to}} {% if cc %}
Cc: {{cc}}
{%endif%}From: IESG Secretary <iesg-secretary@ietf.org>
{% load mail_filters %}{% autoescape off %}To: {{to}}{% if cc %}
Cc: {{cc}}{%endif%}
From: IESG Secretary <iesg-secretary@ietf.org>
Reply-To: IESG Secretary <iesg-secretary@ietf.org>
Subject: Evaluation: {{doc.title}}