diff --git a/client/app/components/DocInfoCard.vue b/client/app/components/DocInfoCard.vue index fe2868b43..52e74c600 100644 --- a/client/app/components/DocInfoCard.vue +++ b/client/app/components/DocInfoCard.vue @@ -177,14 +177,6 @@ :on-success="props.refresh"> {{ rfcToBe.stream?.name ?? rfcToBe.stream?.slug }} - - (published as - {{ rfcToBe.publicationStream.name ?? rfcToBe.publicationStream.slug }}) - diff --git a/datatracker/utils/publication.py b/datatracker/utils/publication.py index 9afc8b35a..ff9c6fcb2 100644 --- a/datatracker/utils/publication.py +++ b/datatracker/utils/publication.py @@ -40,16 +40,13 @@ def publish_rfc_metadata(rfctobe, *, rpcapi: rpcapi_client.PurpleApi): for author in rfctobe.authors.all() ], group=rfctobe.group if rfctobe.group.strip() else None, - stream=rfctobe.publication_stream.slug, + stream=rfctobe.stream.slug, abstract=rfctobe.abstract, pages=rfctobe.pages, std_level=rfctobe.publication_std_level.slug, ad=( rfctobe.iesg_contact.datatracker_id - if ( - rfctobe.iesg_contact is not None - and rfctobe.publication_stream_id == "ietf" - ) + if (rfctobe.iesg_contact is not None and rfctobe.stream_id == "ietf") else None ), obsoletes=list( diff --git a/purple/crossref.py b/purple/crossref.py index 223522968..062127d18 100644 --- a/purple/crossref.py +++ b/purple/crossref.py @@ -116,7 +116,7 @@ def _generate_crossref_xml(rfc_number): # body → report-paper report_paper = ElementTree.SubElement(body, "report-paper") report_paper.append( - ElementTree.Comment(f"Translation of {doc_id} {rfc.publication_stream.name}") + ElementTree.Comment(f"Translation of {doc_id} {rfc.stream.name}") ) # body → report-paper → report-paper_metadata diff --git a/purple_api.yaml b/purple_api.yaml index c308c3420..033971c33 100644 --- a/purple_api.yaml +++ b/purple_api.yaml @@ -6052,11 +6052,6 @@ components: - $ref: "#/components/schemas/Name" readOnly: true description: Current stream - publication_stream: - allOf: - - $ref: "#/components/schemas/Name" - readOnly: true - description: Stream at publication (blank until published) authors: type: array items: diff --git a/rpc/admin.py b/rpc/admin.py index 1a4d3c451..4bab248ad 100644 --- a/rpc/admin.py +++ b/rpc/admin.py @@ -64,7 +64,6 @@ class RfcToBeAdmin(SimpleHistoryAdmin, admin.ModelAdmin): "std_level", "publication_std_level", "stream", - "publication_stream", ] search_fields = ["draft__name", "rfc_number", "title", "group", "keywords"] diff --git a/rpc/factories.py b/rpc/factories.py index 2b1082a14..1d38b169c 100644 --- a/rpc/factories.py +++ b/rpc/factories.py @@ -113,9 +113,6 @@ class Meta: publication_std_level = factory.LazyAttribute( lambda o: o.std_level if o.disposition.slug == "published" else None ) - publication_stream = factory.LazyAttribute( - lambda o: o.stream if o.disposition.slug == "published" else None - ) external_deadline = factory.Faker( "date_time_between", start_date="+1d", diff --git a/rpc/lifecycle/publication.py b/rpc/lifecycle/publication.py index ea4538ccb..fc17c34e5 100644 --- a/rpc/lifecycle/publication.py +++ b/rpc/lifecycle/publication.py @@ -155,7 +155,7 @@ def _rfc_list(queryset) -> list[str]: std_level = rfctobe.publication_std_level or rfctobe.std_level pub_status = std_level.name.upper() if std_level else "" - stream = rfctobe.publication_stream or rfctobe.stream + stream = rfctobe.stream keywords_raw = rfctobe.keywords.strip() if rfctobe.keywords else "" keywords = ( @@ -312,7 +312,6 @@ def _do_publish_rfctobe( # accepts the metadata update rfctobe.published_at = timezone.now() rfctobe.publication_std_level = rfctobe.std_level - rfctobe.publication_stream = rfctobe.stream try: manifest = repo.get_manifest() diff --git a/rpc/migrations/0012_remove_historicalrfctobe_publication_stream_and_more.py b/rpc/migrations/0012_remove_historicalrfctobe_publication_stream_and_more.py new file mode 100644 index 000000000..3fbdbe9b3 --- /dev/null +++ b/rpc/migrations/0012_remove_historicalrfctobe_publication_stream_and_more.py @@ -0,0 +1,20 @@ +# Copyright The IETF Trust 2026, All Rights Reserved + +from django.db import migrations + + +class Migration(migrations.Migration): + dependencies = [ + ("rpc", "0011_historicalactionholder_historicalrpcauthorcomment_and_more"), + ] + + operations = [ + migrations.RemoveField( + model_name="historicalrfctobe", + name="publication_stream", + ), + migrations.RemoveField( + model_name="rfctobe", + name="publication_stream", + ), + ] diff --git a/rpc/models.py b/rpc/models.py index c68e5b604..50a0c7119 100644 --- a/rpc/models.py +++ b/rpc/models.py @@ -303,14 +303,6 @@ class IanaStatus(models.TextChoices): related_name="+", help_text="Current stream", ) - publication_stream = models.ForeignKey( - "StreamName", - on_delete=models.PROTECT, - blank=True, - null=True, - related_name="+", - help_text="Stream at publication (blank until published)", - ) shepherd = models.ForeignKey( "datatracker.DatatrackerPerson", diff --git a/rpc/serializers.py b/rpc/serializers.py index 45b784da8..210f16dbc 100644 --- a/rpc/serializers.py +++ b/rpc/serializers.py @@ -931,9 +931,6 @@ class RfcToBeSerializer(serializers.ModelSerializer): blocking_reasons = RfcToBeBlockingReasonSerializer(many=True, read_only=True) disposition = NameSerializer(read_only=True) stream = NameSerializer(read_only=True, help_text="Current stream") - publication_stream = NameSerializer( - read_only=True, help_text="Stream at publication (blank until published)" - ) std_level = NameSerializer(read_only=True, help_text="Current StdLevel") publication_std_level = NameSerializer( read_only=True, help_text="StdLevel at publication (blank until published)" @@ -1018,7 +1015,6 @@ class Meta: "publication_std_level", "stream", "stream_slug", - "publication_stream", "authors", "shepherd", "shepherd_id", diff --git a/rpc/stats/rollups.py b/rpc/stats/rollups.py index a5c7c4659..f723eac76 100644 --- a/rpc/stats/rollups.py +++ b/rpc/stats/rollups.py @@ -859,8 +859,8 @@ def queue_published_rollup( ) -> dict: """Per-period counts of RFCs published, grouped by stream and status. - "Stream" and "status" are the values *at publication* (``publication_stream`` - / ``publication_std_level``, falling back to the current fields when blank). + "status" is the value *at publication* (``publication_std_level``, falling back + to the current field when blank); "stream" is the current stream. Std levels fold into named buckets (Standards Track = ps/std/ds, etc.); any other slug is "Unknown". Only the IETF/ISE/IRTF/IAB/Editorial streams are counted, and the IETF stream is split into ``ietf-wg`` / ``ietf-ad`` (no @@ -877,7 +877,6 @@ def queue_published_rollup( docs = RfcToBe.objects.filter(published_at__gte=earliest).values_list( "published_at", - "publication_stream_id", "stream_id", "publication_std_level_id", "std_level_id", @@ -886,8 +885,7 @@ def queue_published_rollup( # per-period {(stream, status): count} per_counts: list[dict[tuple[str, str], int]] = [{} for _ in windows] bounds = [(w["start"], min(w["end"], now)) for w in windows] - for pub, pub_stream, stream, pub_level, level, group in docs: - stream = pub_stream or stream + for pub, stream, pub_level, level, group in docs: if stream == "ietf": stream = "ietf-wg" if (group or "").strip() else "ietf-ad" if stream not in PUBLISHED_STREAM_LABELS: diff --git a/templates/rpc/mail/publication.txt b/templates/rpc/mail/publication.txt index 4312e3507..d051fbf92 100644 --- a/templates/rpc/mail/publication.txt +++ b/templates/rpc/mail/publication.txt @@ -24,7 +24,7 @@ {{ rfc_to_be.abstract }} -{% with group=rfc_to_be.group stream=rfc_to_be.publication_stream|default:rfc_to_be.stream %}{% with display_group=group_name|default:group %}{% if stream.slug == "irtf" and group %}This document is a product of the {{ display_group }} Research Group of the IRTF. +{% with group=rfc_to_be.group stream=rfc_to_be.stream %}{% with display_group=group_name|default:group %}{% if stream.slug == "irtf" and group %}This document is a product of the {{ display_group }} Research Group of the IRTF. {% elif stream.slug == "irtf" %}This document is a product of the IRTF. {% elif stream.slug == "iab" %}This document is a product of the Internet Architecture Board. {% elif stream.slug == "ietf" and group %}This document is a product of the {{ display_group }} Working Group of the IETF.