From 0ec0fa58f3d6645aa09e03309f5b39d0ded643b6 Mon Sep 17 00:00:00 2001 From: Ole Laursen Date: Mon, 17 Sep 2012 15:59:35 +0000 Subject: [PATCH] Update IESG agenda pages with IANA Review state, consensus and last call expiration (if applicable) - Legacy-Id: 4852 --- ietf/iesg/views.py | 47 +++++++++++++++++++++++------ ietf/templates/iesg/agenda.html | 1 + ietf/templates/iesg/agenda_doc.html | 15 +++++++++ ietf/templates/iesg/agenda_doc.txt | 7 +++-- ietf/templates/iesg/scribe_doc.html | 11 ++++++- 5 files changed, 69 insertions(+), 12 deletions(-) diff --git a/ietf/iesg/views.py b/ietf/iesg/views.py index 40e4a99c4..cc9cf37a6 100644 --- a/ietf/iesg/views.py +++ b/ietf/iesg/views.py @@ -56,7 +56,7 @@ from ietf.idrfc.utils import update_telechat from ietf.ietfauth.decorators import group_required from ietf.idtracker.templatetags.ietf_filters import in_group from ietf.ipr.models import IprDocAlias -from ietf.doc.models import Document, TelechatDocEvent +from ietf.doc.models import Document, TelechatDocEvent, LastCallDocEvent, ConsensusDocEvent from ietf.group.models import Group def date_threshold(): @@ -193,20 +193,33 @@ if settings.USE_DB_REDESIGN_PROXY_CLASSES: get_doc_section = get_doc_sectionREDESIGN def agenda_docs(date, next_agenda): - from ietf.doc.models import TelechatDocEvent - - matches = Document.objects.filter(docevent__telechatdocevent__telechat_date=date).distinct() + matches = Document.objects.filter(docevent__telechatdocevent__telechat_date=date).select_related("stream").distinct() docmatches = [] - for m in matches: - if m.latest_event(TelechatDocEvent, type="scheduled_for_telechat").telechat_date != date: + for doc in matches: + if doc.latest_event(TelechatDocEvent, type="scheduled_for_telechat").telechat_date != date: continue - e = m.latest_event(type="started_iesg_process") - m.balloting_started = e.time if e else datetime.datetime.min + e = doc.latest_event(type="started_iesg_process") + doc.balloting_started = e.time if e else datetime.datetime.min - docmatches.append(m) + if doc.type_id == "draft": + s = doc.get_state("draft-iana-review") + if s and s.slug in ("not-ok", "changed", "need-rev"): + doc.iana_review_state = str(s) + + if doc.get_state_slug("draft-iesg") == "lc": + e = doc.latest_event(LastCallDocEvent, type="sent_last_call") + if e: + doc.lastcall_expires = e.expires + + doc.consensus = "Unknown" + e = doc.latest_event(ConsensusDocEvent, type="changed_consensus") + if e: + doc.consensus = "Yes" if e.consensus else "No" + + docmatches.append(doc) 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)) for id in docmatches: @@ -314,6 +327,22 @@ def _agenda_json(request, date=None): if defer: docinfo['defer-by'] = defer.by.name docinfo['defer-at'] = str(defer.time) + + if doc.type_id == "draft": + iana_state = doc.get_state("draft-iana-review") + if iana_state.slug in ("not-ok", "changed", "need-rev"): + docinfo['iana_review_state'] = str(iana_state) + + if doc.get_state_slug("draft-iesg") == "lc": + e = doc.latest_event(LastCallDocEvent, type="sent_last_call") + if e: + docinfo['lastcall_expires'] = e.expires + + docinfo['consensus'] = None + e = doc.latest_event(ConsensusDocEvent, type="changed_consensus") + if e: + docinfo['consensus'] = e.consensus + data['sections'][s]['docs'] += [docinfo, ] wgs = agenda_wg_actions(date) diff --git a/ietf/templates/iesg/agenda.html b/ietf/templates/iesg/agenda.html index d08f5645f..012ae6b79 100644 --- a/ietf/templates/iesg/agenda.html +++ b/ietf/templates/iesg/agenda.html @@ -46,6 +46,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #} .agenda blockquote { margin-left: 30px; width: 70ex; font-style:italic;} table.agenda-doc { margin-left: 30px; margin-top:0.5em; margin-bottom: 0.5em; width: 95%; } table.agenda-doc > tbody > tr { vertical-align:top; } +.agenda .stream { padding-left: 0.5em; } {% endblock morecss %} {% block pagehead %} diff --git a/ietf/templates/iesg/agenda_doc.html b/ietf/templates/iesg/agenda_doc.html index ec9530ca5..da89ae2e8 100644 --- a/ietf/templates/iesg/agenda_doc.html +++ b/ietf/templates/iesg/agenda_doc.html @@ -106,6 +106,8 @@ Some parts Copyright (c) 2009 The IETF Trust, all rights reserved. {% endif %} {% endwith %} +{% if doc.obj.stream %} - {{ doc.obj.stream }} stream{% endif %} +
{{ doc.obj.title|escape }} ({{ doc.obj.intended_std_level }}) @@ -132,6 +134,19 @@ Some parts Copyright (c) 2009 The IETF Trust, all rights reserved.
Was deferred by {{defer.by}} on {{defer.time|date:"Y-m-d"}} {% endif %} {% endwith %} + +{% if doc.obj.iana_review_state %} +
IANA Review: {{ doc.obj.iana_review_state }} +{% endif %} + +{% if doc.obj.consensus %} +
Consensus: {{ doc.obj.consensus }} +{% endif %} + +{% if doc.obj.lastcall_expires %} +
Last call expires: {{ doc.obj.lastcall_expires|date:"Y-m-d" }} +{% endif %} + {% ballot_icon doc.obj %} diff --git a/ietf/templates/iesg/agenda_doc.txt b/ietf/templates/iesg/agenda_doc.txt index 143fe8632..abb6706db 100644 --- a/ietf/templates/iesg/agenda_doc.txt +++ b/ietf/templates/iesg/agenda_doc.txt @@ -39,10 +39,13 @@ Some parts Copyright (c) 2009 The IETF Trust, all rights reserved. {{ title2 }} {% endif %}{{ title3 }} {% for doc in section_docs %}{% with doc.obj.rfc_number as rfc_number %} - o {{doc.obj.canonical_name}}{% if not rfc_number %}-{{doc.obj.rev}}{% endif %}{% endwith %} + o {{doc.obj.canonical_name}}{% if not rfc_number %}-{{doc.obj.rev}}{% endif %}{% endwith %}{% if doc.obj.stream %} - {{ doc.obj.stream }} stream{% endif %} {% filter wordwrap:"68"|indent|indent %}{{ doc.obj.title }} ({{ doc.obj.intended_std_level }}){% endfilter %} {% if doc.obj.note %}{# note: note is not escaped #} {% filter wordwrap:"68"|indent|indent %}Note: {{ doc.obj.note|striptags }}{% endfilter %} -{% endif %} Token: {{ doc.obj.ad }} +{% endif %} Token: {{ doc.obj.ad }}{% if doc.obj.iana_review_state %} + IANA Review: {{ doc.obj.iana_review_state }}{% endif %}{% if doc.obj.consensus %} + Consensus: {{ doc.obj.consensus }}{% endif %}{% if doc.obj.lastcall_expires %} + Last call expires: {{ doc.obj.lastcall_expires|date:"Y-m-d" }}{% endif %} {% with doc.obj.active_defer_event as defer %}{% if defer %} Was deferred by {{defer.by}} on {{defer.time|date:"Y-m-d"}}{% endif %}{% endwith %} {% empty %} NONE diff --git a/ietf/templates/iesg/scribe_doc.html b/ietf/templates/iesg/scribe_doc.html index 9ef60865a..32570a1e0 100644 --- a/ietf/templates/iesg/scribe_doc.html +++ b/ietf/templates/iesg/scribe_doc.html @@ -53,10 +53,19 @@ Some parts Copyright (c) 2009 The IETF Trust, all rights reserved. [txt] {% endif %} {% endwith %} + + {% if doc.obj.stream %} - {{ doc.obj.stream }} stream{% endif %} +
Token: {{ doc.obj.ad|escape }} ({{doc.obj.area_acronym}} area) - {% if doc.obj.note %}{# note: note is not escaped #} + {% if doc.obj.note %}{# note: note is not escaped #}
Note: {{ doc.obj.note|safe }} {% endif %} + {% if doc.obj.iana_review_state %} +
IANA Review: {{ doc.obj.iana_review_state }} + {% endif %} + {% if doc.obj.consensus %} +
Consensus: {{ doc.obj.consensus }} + {% endif %} {% for ipr in doc.obj.ipr %} {% ifequal ipr.ipr.status 1 %}
IPR: {{ ipr.ipr.title|escape }}