Repository: ietf-tools/datatracker

Issue:
Status change messages to IANA
`type_defect`   |    by cmorgan@amsl.com

___


Can these addresses please be added to the lists of recipients for status change notifications (like “Moving RFC 4491 to Historic”)?

For status change last calls: drafts-lastcall@icann.org

For status change evaluations: drafts-eval@icann.org

(IANA is already receiving the status change approval messages).

Thank you!

___
_Issue migrated from trac:3504 at 2022-03-04 09:23:54 +0000_


Discussion:
_@rjsparks@nostrum.com_ _changed priority from `n/a` to `major`_
_@rjsparks@nostrum.com_ _changed status from `new` to `accepted`_
cc @sabrinatanamal
Sending a note at last call will be easy.

Sending a note for evaluation is not going to be easy - the IESG is not in the habit of "issuing ballots" for status-changes - they just create them, then put the document on a telechat.

I wonder if we should change the notification for both drafts and status-changes from "ballot issued" to "placed on telechat"?

@cindymorgan , @akvezza
The evaluation ticket for status changes is sent to the secretariat when the document's iesg state is set to evaluation, not when the ballot is issued. I can add a message to IANA at the same place.

Resolving patch:
diff --git a/ietf/doc/views_ballot.py b/ietf/doc/views_ballot.py
--- a/ietf/doc/views_ballot.py
+++ b/ietf/doc/views_ballot.py
@@ -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})
\ No newline at end of file
+    return render(request, 'doc/irsg_ballot_status.html', {'docs':docs})
diff --git a/ietf/doc/views_status_change.py b/ietf/doc/views_status_change.py
--- a/ietf/doc/views_status_change.py
+++ b/ietf/doc/views_status_change.py
@@ -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)
diff --git a/ietf/settings.py b/ietf/settings.py
--- a/ietf/settings.py
+++ b/ietf/settings.py
@@ -760,7 +760,6 @@ def skip_unreadable_post(record):
 # 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"


Test patch:
diff --git a/ietf/doc/tests.py b/ietf/doc/tests.py
--- a/ietf/doc/tests.py
+++ b/ietf/doc/tests.py
@@ -49,7 +49,7 @@
 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 @@ def test_document_ballot_needed_positions(self):
         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)))