Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions client/app/components/DocInfoCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -177,14 +177,6 @@
:on-success="props.refresh">
<span class="flex-1">
{{ rfcToBe.stream?.name ?? rfcToBe.stream?.slug }}
<span
v-if="
rfcToBe.publicationStream &&
rfcToBe.publicationStream.slug !== rfcToBe.stream?.slug
">
(published as
{{ rfcToBe.publicationStream.name ?? rfcToBe.publicationStream.slug }})
</span>
</span>
</PatchRfcToBeField>
</DescriptionListDetails>
Expand Down
7 changes: 2 additions & 5 deletions datatracker/utils/publication.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion purple/crossref.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 0 additions & 5 deletions purple_api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 0 additions & 1 deletion rpc/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

Expand Down
3 changes: 0 additions & 3 deletions rpc/factories.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 1 addition & 2 deletions rpc/lifecycle/publication.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = (
Expand Down Expand Up @@ -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()
Expand Down
Original file line number Diff line number Diff line change
@@ -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",
),
]
8 changes: 0 additions & 8 deletions rpc/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 0 additions & 4 deletions rpc/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)"
Expand Down Expand Up @@ -1018,7 +1015,6 @@ class Meta:
"publication_std_level",
"stream",
"stream_slug",
"publication_stream",
"authors",
"shepherd",
"shepherd_id",
Expand Down
8 changes: 3 additions & 5 deletions rpc/stats/rollups.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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",
Expand All @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion templates/rpc/mail/publication.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down