diff --git a/ietf/doc/mails.py b/ietf/doc/mails.py index 7d83a67fd..b3cd75f1d 100644 --- a/ietf/doc/mails.py +++ b/ietf/doc/mails.py @@ -148,7 +148,7 @@ def generate_last_call_announcement(request, doc): else: ipr_links = None - downrefs = [rel for rel in doc.relateddocument_set.all() if rel.is_downref()] + downrefs = [rel for rel in doc.relateddocument_set.all() if rel.is_downref() and not rel.is_approved_downref()] addrs = gather_address_lists('last_call_issued',doc=doc).as_strings() mail = render_to_string("doc/mail/last_call_announcement.txt", diff --git a/ietf/doc/models.py b/ietf/doc/models.py index 539ccedab..4a95fe68f 100644 --- a/ietf/doc/models.py +++ b/ietf/doc/models.py @@ -494,6 +494,14 @@ class RelatedDocument(models.Model): return None + def is_approved_downref(self): + + if self.target.document.get_state().slug == 'rfc': + if RelatedDocument.objects.filter(relationship_id='downref-approval', target=self.target): + return "Approved Downref" + + return False + class DocumentAuthor(models.Model): document = models.ForeignKey('Document') author = models.ForeignKey(Email, help_text="Email address used by author for submission") diff --git a/ietf/doc/tests_ballot.py b/ietf/doc/tests_ballot.py index cd0618f7a..3007c666c 100644 --- a/ietf/doc/tests_ballot.py +++ b/ietf/doc/tests_ballot.py @@ -753,7 +753,7 @@ class RegenerateLastCallTestCase(TestCase): draft = Document.objects.get(name=draft.name) lc_text = draft.latest_event(WriteupDocEvent, type="changed_last_call_text").text self.assertTrue("Subject: Last Call" in lc_text) - self.assertFalse("contains normative down" in lc_text) + self.assertFalse("contains these normative down" in lc_text) rfc = DocumentFactory.create( stream_id='ise', @@ -768,6 +768,15 @@ class RegenerateLastCallTestCase(TestCase): self.assertEqual(r.status_code, 200) draft = Document.objects.get(name=draft.name) lc_text = draft.latest_event(WriteupDocEvent, type="changed_last_call_text").text - self.assertTrue('contains these normative down' in lc_text) - self.assertTrue('rfc6666' in lc_text) - self.assertTrue('Independent Submission Editor stream' in lc_text) + self.assertTrue("contains these normative down" in lc_text) + self.assertTrue("rfc6666" in lc_text) + self.assertTrue("Independent Submission Editor stream" in lc_text) + + draft.relateddocument_set.create(target=rfc.docalias_set.get(name='rfc6666'),relationship_id='downref-approval') + + r = self.client.post(url, dict(regenerate_last_call_text="1")) + self.assertEqual(r.status_code, 200) + draft = Document.objects.get(name=draft.name) + lc_text = draft.latest_event(WriteupDocEvent, type="changed_last_call_text").text + self.assertFalse("contains these normative down" in lc_text) + self.assertFalse("rfc6666" in lc_text) diff --git a/ietf/settings_sqlitetest.py b/ietf/settings_sqlitetest.py index 6180cacaa..460e5166f 100644 --- a/ietf/settings_sqlitetest.py +++ b/ietf/settings_sqlitetest.py @@ -43,7 +43,7 @@ DATABASES = { if TEST_CODE_COVERAGE_CHECKER and not TEST_CODE_COVERAGE_CHECKER._started: # pyflakes:ignore TEST_CODE_COVERAGE_CHECKER.start() # pyflakes:ignore -NOMCOM_PUBLIC_KEYS_DIR=os.path.abspath("tmp-nomcom-public-keys-dir") +#NOMCOM_PUBLIC_KEYS_DIR=os.path.abspath("tmp-nomcom-public-keys-dir") MEDIA_ROOT = os.path.join(os.path.dirname(BASE_DIR), 'test/media/') # pyflakes:ignore MEDIA_URL = '/test/media/' diff --git a/ietf/templates/doc/mail/last_call_announcement.txt b/ietf/templates/doc/mail/last_call_announcement.txt index 84bc16ed1..936289b84 100644 --- a/ietf/templates/doc/mail/last_call_announcement.txt +++ b/ietf/templates/doc/mail/last_call_announcement.txt @@ -36,6 +36,6 @@ No IPR declarations have been submitted directly on this I-D. The document contains these normative downward references. See RFC 3967 for additional information: {% for ref in downrefs %} {{ref.target.document.canonical_name}}: {{ref.target.document.title}} ({{ref.target.document.std_level}} - {{ref.target.document.stream.desc}}) -{% endfor %}Note that some of these references may already be listed in the acceptable Downref Registry.{%endif%} +{% endfor %}{%endif%} {% endautoescape %} diff --git a/ready-for-merge b/ready-for-merge index 402058f1a..284b9942d 100644 --- a/ready-for-merge +++ b/ready-for-merge @@ -7,6 +7,7 @@ # --- Add entries at the top --- +/personal/housley/6.48.2.dev0@13205 /personal/housley/6.48.2.dev0@13181 /personal/housley/6.37.2.dev0@12326