Skip to content

Commit 0ec0fa5

Browse files
committed
Update IESG agenda pages with IANA Review state, consensus and last
call expiration (if applicable) - Legacy-Id: 4852
1 parent 85d2cdd commit 0ec0fa5

5 files changed

Lines changed: 69 additions & 12 deletions

File tree

ietf/iesg/views.py

Lines changed: 38 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
from ietf.ietfauth.decorators import group_required
5757
from ietf.idtracker.templatetags.ietf_filters import in_group
5858
from ietf.ipr.models import IprDocAlias
59-
from ietf.doc.models import Document, TelechatDocEvent
59+
from ietf.doc.models import Document, TelechatDocEvent, LastCallDocEvent, ConsensusDocEvent
6060
from ietf.group.models import Group
6161

6262
def date_threshold():
@@ -193,20 +193,33 @@ def get_wg_section(wg):
193193
get_doc_section = get_doc_sectionREDESIGN
194194

195195
def agenda_docs(date, next_agenda):
196-
from ietf.doc.models import TelechatDocEvent
197-
198-
matches = Document.objects.filter(docevent__telechatdocevent__telechat_date=date).distinct()
196+
matches = Document.objects.filter(docevent__telechatdocevent__telechat_date=date).select_related("stream").distinct()
199197

200198
docmatches = []
201199

202-
for m in matches:
203-
if m.latest_event(TelechatDocEvent, type="scheduled_for_telechat").telechat_date != date:
200+
for doc in matches:
201+
if doc.latest_event(TelechatDocEvent, type="scheduled_for_telechat").telechat_date != date:
204202
continue
205203

206-
e = m.latest_event(type="started_iesg_process")
207-
m.balloting_started = e.time if e else datetime.datetime.min
204+
e = doc.latest_event(type="started_iesg_process")
205+
doc.balloting_started = e.time if e else datetime.datetime.min
206+
207+
if doc.type_id == "draft":
208+
s = doc.get_state("draft-iana-review")
209+
if s and s.slug in ("not-ok", "changed", "need-rev"):
210+
doc.iana_review_state = str(s)
211+
212+
if doc.get_state_slug("draft-iesg") == "lc":
213+
e = doc.latest_event(LastCallDocEvent, type="sent_last_call")
214+
if e:
215+
doc.lastcall_expires = e.expires
216+
217+
doc.consensus = "Unknown"
218+
e = doc.latest_event(ConsensusDocEvent, type="changed_consensus")
219+
if e:
220+
doc.consensus = "Yes" if e.consensus else "No"
208221

209-
docmatches.append(m)
222+
docmatches.append(doc)
210223

211224
res = dict(("s%s%s%s" % (i, j, k), []) for i in range(2, 5) for j in range (1, 4) for k in range(1, 4))
212225
for id in docmatches:
@@ -314,6 +327,22 @@ def _agenda_json(request, date=None):
314327
if defer:
315328
docinfo['defer-by'] = defer.by.name
316329
docinfo['defer-at'] = str(defer.time)
330+
331+
if doc.type_id == "draft":
332+
iana_state = doc.get_state("draft-iana-review")
333+
if iana_state.slug in ("not-ok", "changed", "need-rev"):
334+
docinfo['iana_review_state'] = str(iana_state)
335+
336+
if doc.get_state_slug("draft-iesg") == "lc":
337+
e = doc.latest_event(LastCallDocEvent, type="sent_last_call")
338+
if e:
339+
docinfo['lastcall_expires'] = e.expires
340+
341+
docinfo['consensus'] = None
342+
e = doc.latest_event(ConsensusDocEvent, type="changed_consensus")
343+
if e:
344+
docinfo['consensus'] = e.consensus
345+
317346
data['sections'][s]['docs'] += [docinfo, ]
318347

319348
wgs = agenda_wg_actions(date)

ietf/templates/iesg/agenda.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
.agenda blockquote { margin-left: 30px; width: 70ex; font-style:italic;}
4747
table.agenda-doc { margin-left: 30px; margin-top:0.5em; margin-bottom: 0.5em; width: 95%; }
4848
table.agenda-doc > tbody > tr { vertical-align:top; }
49+
.agenda .stream { padding-left: 0.5em; }
4950
{% endblock morecss %}
5051

5152
{% block pagehead %}

ietf/templates/iesg/agenda_doc.html

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,8 @@ <h3>{{ title2 }}</h3>
106106
{% endif %}
107107
{% endwith %}
108108

109+
<span class="stream">{% if doc.obj.stream %} - {{ doc.obj.stream }} stream{% endif %}</span>
110+
109111
<br/>{{ doc.obj.title|escape }} ({{ doc.obj.intended_std_level }})
110112

111113

@@ -132,6 +134,19 @@ <h5>IPR:</h5>
132134
<br/>Was deferred by {{defer.by}} on {{defer.time|date:"Y-m-d"}}
133135
{% endif %}
134136
{% endwith %}
137+
138+
{% if doc.obj.iana_review_state %}
139+
<br/>IANA Review: {{ doc.obj.iana_review_state }}
140+
{% endif %}
141+
142+
{% if doc.obj.consensus %}
143+
<br/>Consensus: {{ doc.obj.consensus }}
144+
{% endif %}
145+
146+
{% if doc.obj.lastcall_expires %}
147+
<br/>Last call expires: {{ doc.obj.lastcall_expires|date:"Y-m-d" }}
148+
{% endif %}
149+
135150
</td><td style="padding-left:20px; width: 50px;">
136151
{% ballot_icon doc.obj %}
137152
</td></tr></tbody></table>

ietf/templates/iesg/agenda_doc.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,13 @@ Some parts Copyright (c) 2009 The IETF Trust, all rights reserved.
3939
{{ title2 }}
4040
{% endif %}{{ title3 }}
4141
{% for doc in section_docs %}{% with doc.obj.rfc_number as rfc_number %}
42-
o {{doc.obj.canonical_name}}{% if not rfc_number %}-{{doc.obj.rev}}{% endif %}{% endwith %}
42+
o {{doc.obj.canonical_name}}{% if not rfc_number %}-{{doc.obj.rev}}{% endif %}{% endwith %}{% if doc.obj.stream %} - {{ doc.obj.stream }} stream{% endif %}
4343
{% filter wordwrap:"68"|indent|indent %}{{ doc.obj.title }} ({{ doc.obj.intended_std_level }}){% endfilter %}
4444
{% if doc.obj.note %}{# note: note is not escaped #} {% filter wordwrap:"68"|indent|indent %}Note: {{ doc.obj.note|striptags }}{% endfilter %}
45-
{% endif %} Token: {{ doc.obj.ad }}
45+
{% endif %} Token: {{ doc.obj.ad }}{% if doc.obj.iana_review_state %}
46+
IANA Review: {{ doc.obj.iana_review_state }}{% endif %}{% if doc.obj.consensus %}
47+
Consensus: {{ doc.obj.consensus }}{% endif %}{% if doc.obj.lastcall_expires %}
48+
Last call expires: {{ doc.obj.lastcall_expires|date:"Y-m-d" }}{% endif %}
4649
{% with doc.obj.active_defer_event as defer %}{% if defer %} Was deferred by {{defer.by}} on {{defer.time|date:"Y-m-d"}}{% endif %}{% endwith %}
4750
{% empty %}
4851
NONE

ietf/templates/iesg/scribe_doc.html

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,19 @@
5353
<a href="http://www.ietf.org/id/{{doc.obj.canonical_name}}-{{doc.obj.rev}}.txt">[txt]</a>
5454
{% endif %}
5555
{% endwith %}
56+
57+
<span class="stream">{% if doc.obj.stream %} - {{ doc.obj.stream }} stream{% endif %}</span>
58+
5659
<br/>Token: {{ doc.obj.ad|escape }} ({{doc.obj.area_acronym}} area)
57-
{% if doc.obj.note %}{# note: note is not escaped #}
60+
{% if doc.obj.note %}{# note: note is not escaped #}
5861
<br/>Note: {{ doc.obj.note|safe }}
5962
{% endif %}
63+
{% if doc.obj.iana_review_state %}
64+
<br/>IANA Review: {{ doc.obj.iana_review_state }}
65+
{% endif %}
66+
{% if doc.obj.consensus %}
67+
<br/>Consensus: {{ doc.obj.consensus }}
68+
{% endif %}
6069
{% for ipr in doc.obj.ipr %}
6170
{% ifequal ipr.ipr.status 1 %}
6271
<br/>IPR: <a href="http://datatracker.ietf.org/ipr/{{ ipr.ipr.ipr_id }}/">{{ ipr.ipr.title|escape }}</a>

0 commit comments

Comments
 (0)