Skip to content

Commit e9c6c9e

Browse files
committed
Only show new consensus field for IETF and IRTF stream documents
- Legacy-Id: 4876
1 parent 915908c commit e9c6c9e

3 files changed

Lines changed: 16 additions & 11 deletions

File tree

ietf/idrfc/views_doc.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -410,8 +410,9 @@ def extract_name(s):
410410
data["iana_review_state"] = extract_name(doc.get_state("draft-iana-review"))
411411
data["iana_action_state"] = extract_name(doc.get_state("draft-iana-action"))
412412

413-
e = doc.latest_event(ConsensusDocEvent, type="changed_consensus")
414-
data["consensus"] = e.consensus if e else None
413+
if doc.stream_id in ("ietf", "irtf"):
414+
e = doc.latest_event(ConsensusDocEvent, type="changed_consensus")
415+
data["consensus"] = e.consensus if e else None
415416
data["stream"] = extract_name(doc.stream)
416417

417418
return HttpResponse(json.dumps(data, indent=2), mimetype='text/plain')
@@ -473,9 +474,11 @@ def document_main_idrfc(request, name, tab):
473474
info['rfc_editor_state'] = id.get_state("draft-rfceditor")
474475
info['iana_review_state'] = id.get_state("draft-iana-review")
475476
info['iana_action_state'] = id.get_state("draft-iana-action")
476-
e = id.latest_event(ConsensusDocEvent, type="changed_consensus")
477-
info["consensus"] = nice_consensus(e and e.consensus)
478-
info["can_edit_consensus"] = can_edit_consensus(id, request.user)
477+
info["consensus"] = None
478+
if id.stream_id in ("ietf", "irtf"):
479+
e = id.latest_event(ConsensusDocEvent, type="changed_consensus")
480+
info["consensus"] = nice_consensus(e and e.consensus)
481+
info["can_edit_consensus"] = can_edit_consensus(id, request.user)
479482
info["can_edit_intended_std_level"] = can_edit_intended_std_level(id, request.user)
480483

481484
(content1, content2) = _get_html(

ietf/iesg/views.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,6 @@ def get_doc_section(id):
141141

142142
def get_doc_sectionREDESIGN(doc):
143143
if doc.type_id == 'draft':
144-
states = [16,17,18,19,20,21]
145144
if doc.intended_std_level_id in ["bcp", "ds", "ps", "std"]:
146145
s = "2"
147146
else:
@@ -154,7 +153,7 @@ def get_doc_sectionREDESIGN(doc):
154153
s = s + "3"
155154
else:
156155
s = s + "2"
157-
if not doc.get_state_slug=="rfc" and doc.get_state('draft-iesg').order not in states:
156+
if not doc.get_state_slug=="rfc" and doc.get_state_slug('draft-iesg') not in ("lc", "writeupw", "goaheadw", "iesg-eva", "defer"):
158157
s = s + "3"
159158
elif doc.returning_item():
160159
s = s + "2"
@@ -214,10 +213,11 @@ def agenda_docs(date, next_agenda):
214213
if e:
215214
doc.lastcall_expires = e.expires
216215

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"
216+
if doc.stream_id in ("ietf", "irtf"):
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"
221221

222222
docmatches.append(doc)
223223

ietf/templates/idrfc/doc_tab_document_id.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,9 @@
116116
{% endif %}
117117
<tr><td>Document shepherd:</td><td>{{ stream_info.shepherd|default:"" }}</td></tr>
118118

119+
{% if info.consensus %}
119120
<tr><td>Consensus:</td><td><a title="Whether the document is the result of a community consensus process as defined in RFC 5741" {% if info.can_edit_consensus %}class="editlink" href="{% url doc_edit_consensus name=doc.draft_name %}"{% endif %}>{{ info.consensus }}</a></td></tr>
121+
{% endif %}
120122

121123
<tr><td colspan='2'><hr size='1' noshade /></td></tr>
122124

0 commit comments

Comments
 (0)