Skip to content

Commit

Permalink
fix: redundant word in banner for Legacy stream documents (#7207)
Browse files Browse the repository at this point in the history
* fix: Remove redundant "stream stream" output

fix: Change "Legacy stream" to "Legacy"

chore: Add "stream" to stream.desc as needed

Fixes: #6902

* chore: Remove unused stream_desc parameter

The stream_desc key isn't used in template/doc/docuemnt_draft.html to
don't pass it in nor compute it

Fixes: #6902

* fix: migrate the legacy StreamName

---------

Co-authored-by: Robert Sparks <[email protected]>
  • Loading branch information
richsalz and rjsparks authored Aug 5, 2024
1 parent b13a606 commit 8a5826a
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 10 deletions.
8 changes: 1 addition & 7 deletions ietf/doc/views_doc.py
Original file line number Diff line number Diff line change
Expand Up @@ -607,12 +607,7 @@ def document_main(request, name, rev=None, document_html=False):
additional_urls = doc.documenturl_set.exclude(tag_id='auth48')

# Stream description and name passing test
if doc.stream != None:
stream_desc = doc.stream.desc
stream = "draft-stream-" + doc.stream.slug
else:
stream_desc = "(None)"
stream = "(None)"
stream = ("draft-stream-" + doc.stream.slug) if doc.stream != None else "(None)"

html = None
js = None
Expand Down Expand Up @@ -651,7 +646,6 @@ def document_main(request, name, rev=None, document_html=False):
revisions=simple_diff_revisions if document_html else revisions,
snapshot=snapshot,
stream=stream,
stream_desc=stream_desc,
latest_revision=latest_revision,
latest_rev=latest_rev,
can_edit=can_edit,
Expand Down
2 changes: 1 addition & 1 deletion ietf/name/fixtures/names.json
Original file line number Diff line number Diff line change
Expand Up @@ -14058,7 +14058,7 @@
},
{
"fields": {
"desc": "Legacy stream",
"desc": "Legacy",
"name": "Legacy",
"order": 6,
"used": true
Expand Down
21 changes: 21 additions & 0 deletions ietf/name/migrations/0014_change_legacy_stream_desc.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright The IETF Trust 2024, All Rights Reserved

from django.db import migrations

def forward(apps, schema_editor):
StreamName = apps.get_model("name", "StreamName")
StreamName.objects.filter(pk="legacy").update(desc="Legacy")

def reverse(apps, schema_editor):
StreamName = apps.get_model("name", "StreamName")
StreamName.objects.filter(pk="legacy").update(desc="Legacy stream")

class Migration(migrations.Migration):

dependencies = [
("name", "0013_narrativeminutes"),
]

operations = [
migrations.RunPython(forward, reverse)
]
2 changes: 1 addition & 1 deletion ietf/secr/templates/telechat/doc.html
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ <h2 id="writeup">Ballot Writeup</h2>
<h2 id="downrefs">Downward References</h2>
{% for ref in downrefs %}
<p>Add {{ref.target.name}}
({{ref.target.std_level}} - {{ref.target.stream.desc}})
({{ref.target.std_level}} - {{ref.target.stream.desc}} stream)
to downref registry.<br>
{% if not ref.target.std_level %}
+++ Warning: The standards level has not been set yet!!!<br>
Expand Down
2 changes: 1 addition & 1 deletion ietf/templates/doc/mail/last_call_announcement.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ No IPR declarations have been submitted directly on this I-D.
{% if downrefs %}
The document contains these normative downward references.
See RFC 3967 for additional information:
{% for ref in downrefs %} {{ref.target.name}}: {{ref.target.title}} ({{ref.target.std_level}} - {{ref.target.stream.desc}})
{% for ref in downrefs %} {{ref.target.name}}: {{ref.target.title}} ({{ref.target.std_level}} - {{ref.target.stream.desc}} stream)
{% endfor %}{%endif%}

{% endautoescape %}

0 comments on commit 8a5826a

Please sign in to comment.