Skip to content
Merged
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
2 changes: 1 addition & 1 deletion ietf/doc/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -828,7 +828,7 @@ def test_document_draft(self):
stream_id=draft.stream_id, group_id=draft.group_id, abstract=draft.abstract,stream=draft.stream, rev=draft.rev,
pages=draft.pages, intended_std_level_id=draft.intended_std_level_id,
shepherd_id=draft.shepherd_id, ad_id=draft.ad_id, expires=draft.expires,
notify=draft.notify, note=draft.note)
notify=draft.notify)
rel = RelatedDocument.objects.create(source=replacement,
target=draft.docalias.get(name__startswith="draft"),
relationship_id="replaces")
Expand Down
29 changes: 3 additions & 26 deletions ietf/doc/tests_draft.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,16 +362,14 @@ def test_edit_info(self):
stream=draft.stream_id,
ad=str(new_ad.pk),
notify="test@example.com",
note="New note",
telechat_date="",
))
self.assertEqual(r.status_code, 302)

draft = Document.objects.get(name=draft.name)
self.assertEqual(draft.ad, new_ad)
self.assertEqual(draft.note, "New note")
self.assertTrue(not draft.latest_event(TelechatDocEvent, type="scheduled_for_telechat"))
self.assertEqual(draft.docevent_set.count(), events_before + 3)
self.assertEqual(draft.docevent_set.count(), events_before + 2)
self.assertEqual(len(outbox), mailbox_before + 1)
self.assertTrue(draft.name in outbox[-1]['Subject'])

Expand All @@ -386,7 +384,6 @@ def test_edit_telechat_date(self):
stream=draft.stream_id,
ad=str(draft.ad_id),
notify=draft.notify,
note="",
)

# get
Expand Down Expand Up @@ -489,20 +486,18 @@ def test_start_iesg_process_on_draft(self):
ad=ad.pk,
create_in_state=State.objects.get(used=True, type="draft-iesg", slug="watching").pk,
notify="test@example.com",
note="This is a note",
telechat_date="",
))
self.assertEqual(r.status_code, 302)

draft = Document.objects.get(name=draft.name)
self.assertEqual(draft.get_state_slug("draft-iesg"), "watching")
self.assertEqual(draft.ad, ad)
self.assertEqual(draft.note, "This is a note")
self.assertTrue(not draft.latest_event(TelechatDocEvent, type="scheduled_for_telechat"))
self.assertEqual(draft.docevent_set.count(), events_before + 5)
self.assertEqual(draft.docevent_set.count(), events_before + 4)
self.assertCountEqual(draft.action_holders.all(), [draft.ad])
events = list(draft.docevent_set.order_by('time', 'id'))
self.assertEqual(events[-5].type, "started_iesg_process")
self.assertEqual(events[-4].type, "started_iesg_process")
self.assertEqual(len(outbox), mailbox_before+1)
self.assertTrue('IESG processing' in outbox[-1]['Subject'])
self.assertTrue('draft-ietf-mars-test2@' in outbox[-1]['To'])
Expand All @@ -518,7 +513,6 @@ def test_start_iesg_process_on_draft(self):
ad=ad.pk,
create_in_state=State.objects.get(used=True, type="draft-iesg", slug="pub-req").pk,
notify="test@example.com",
note="This is a note",
telechat_date="",
))
self.assertEqual(r.status_code, 302)
Expand Down Expand Up @@ -1043,23 +1037,6 @@ def test_doc_change_telechat_date(self):
doc = Document.objects.get(name=self.docname)
self.assertEqual(doc.latest_event(TelechatDocEvent, "scheduled_for_telechat").telechat_date,None)

def test_doc_change_iesg_note(self):
url = urlreverse('ietf.doc.views_draft.edit_iesg_note', kwargs=dict(name=self.docname))
login_testing_unauthorized(self, "secretary", url)

# get
r = self.client.get(url)
self.assertEqual(r.status_code,200)
q = PyQuery(r.content)
self.assertEqual(len(q('[type=submit]:contains("Save")')),1)

# post
r = self.client.post(url,dict(note='ZpyQFGmA\r\nZpyQFGmA'))
self.assertEqual(r.status_code,302)
doc = Document.objects.get(name=self.docname)
self.assertEqual(doc.note,'ZpyQFGmA\nZpyQFGmA')
self.assertTrue('ZpyQFGmA' in doc.latest_event(DocEvent,type='added_comment').desc)

def test_doc_change_ad(self):
url = urlreverse('ietf.doc.views_draft.edit_ad', kwargs=dict(name=self.docname))
login_testing_unauthorized(self, "secretary", url)
Expand Down
1 change: 0 additions & 1 deletion ietf/doc/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@
url(r'^%(name)s/edit/suggested-replaces/$' % settings.URL_REGEXPS, views_draft.review_possibly_replaces),
url(r'^%(name)s/edit/status/$' % settings.URL_REGEXPS, views_draft.change_intention),
url(r'^%(name)s/edit/telechat/$' % settings.URL_REGEXPS, views_doc.telechat_date),
url(r'^%(name)s/edit/iesgnote/$' % settings.URL_REGEXPS, views_draft.edit_iesg_note),
url(r'^%(name)s/edit/ad/$' % settings.URL_REGEXPS, views_draft.edit_ad),
url(r'^%(name)s/edit/authors/$' % settings.URL_REGEXPS, views_doc.edit_authors),
url(r'^%(name)s/edit/consensus/$' % settings.URL_REGEXPS, views_draft.edit_consensus),
Expand Down
63 changes: 0 additions & 63 deletions ietf/doc/views_draft.py
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,6 @@ class EditInfoForm(forms.Form):
help_text="Separate email addresses with commas.",
required=False,
)
note = forms.CharField(widget=forms.Textarea, label="IESG note", required=False, strip=False)
telechat_date = forms.TypedChoiceField(coerce=lambda x: datetime.datetime.strptime(x, '%Y-%m-%d').date(), empty_value=None, required=False, widget=forms.Select(attrs={'onchange':'make_bold()'}))
returning_item = forms.BooleanField(required=False)

Expand All @@ -515,9 +514,6 @@ def __init__(self, *args, **kwargs):
# returning item is rendered non-standard
self.standard_fields = [x for x in self.visible_fields() if x.name not in ('returning_item',)]

def clean_note(self):
return self.cleaned_data['note'].replace('\r', '').strip()

def to_iesg(request,name):
""" Submit an IETF stream document to the IESG for publication """
doc = get_object_or_404(Document, docalias__name=name, stream='ietf')
Expand Down Expand Up @@ -715,18 +711,6 @@ def diff(attr, name):
diff('ad', "Responsible AD")
diff('notify', "State Change Notice email list")

if r['note'] != doc.note:
if not r['note']:
if doc.note:
changes.append("Note field has been cleared")
else:
if doc.note:
changes.append("Note changed to '%s'" % r['note'])
else:
changes.append("Note added '%s'" % r['note'])

doc.note = r['note']

if doc.group.type_id in ("individ", "area"):
if not r["area"]:
r["area"] = Group.objects.get(type="individ")
Expand Down Expand Up @@ -769,7 +753,6 @@ def diff(attr, name):
area=doc.group_id,
ad=doc.ad_id,
notify=doc.notify,
note=doc.note,
telechat_date=initial_telechat_date,
returning_item=initial_returning_item,
)
Expand Down Expand Up @@ -862,52 +845,6 @@ def restore_draft_file(request, draft):
log.log(" Exception %s when attempting to move %s" % (ex, file))


class IESGNoteForm(forms.Form):
note = forms.CharField(widget=forms.Textarea, label="IESG note", required=False, strip=False)

def clean_note(self):
# not munging the database content to use html line breaks --
# that has caused a lot of pain in the past.
return self.cleaned_data['note'].replace('\r', '').strip()

@role_required("Area Director", "Secretariat")
def edit_iesg_note(request, name):
doc = get_object_or_404(Document, type="draft", name=name)
login = request.user.person

initial = dict(note=doc.note)

if request.method == "POST":
form = IESGNoteForm(request.POST, initial=initial)

if form.is_valid():
new_note = form.cleaned_data['note']
if new_note != doc.note:
if not new_note:
if doc.note:
log_message = "Note field has been cleared"
else:
if doc.note:
log_message = "Note changed to '%s'" % new_note
else:
log_message = "Note added '%s'" % new_note

c = DocEvent(type="added_comment", doc=doc, rev=doc.rev, by=login)
c.desc = log_message
c.save()

doc.note = new_note
doc.save_with_history([c])

return redirect('ietf.doc.views_doc.document_main', name=doc.name)
else:
form = IESGNoteForm(initial=initial)

return render(request, 'doc/draft/edit_iesg_note.html',
dict(doc=doc,
form=form,
))

class ShepherdWriteupUploadForm(forms.Form):
content = forms.CharField(widget=forms.Textarea, label="Shepherd writeup", help_text="Edit the shepherd writeup.", required=False, strip=False)
txt = forms.FileField(label=".txt format", help_text="Or upload a .txt file.", required=False)
Expand Down
2 changes: 0 additions & 2 deletions ietf/iesg/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,6 @@ def agenda_json(request, date=None):
'ad':doc.ad.name if doc.ad else None,
}

if doc.note:
docinfo['note'] = doc.note
defer = doc.active_defer_event()
if defer:
docinfo['defer-by'] = defer.by.name
Expand Down
3 changes: 0 additions & 3 deletions ietf/submit/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,6 @@ def submit_new_wg(self, formats):
ad=draft.ad,
expires=timezone.now() + datetime.timedelta(days=settings.INTERNET_DRAFT_DAYS_TO_EXPIRE),
notify="aliens@example.mars",
note="",
)
sug_replaced_draft.set_state(State.objects.get(used=True, type="draft", slug="active"))
sug_replaced_alias = DocAlias.objects.create(name=sug_replaced_draft.name)
Expand Down Expand Up @@ -1413,7 +1412,6 @@ def test_edit_submission_and_force_post(self):
"submitter-name": "Some Random Test Person",
"submitter-email": "random@example.com",
"replaces": [str(draft.docalias.first().pk)],
"edit-note": "no comments",
"authors-0-name": "Person 1",
"authors-0-email": "person1@example.com",
"authors-1-name": "Person 2",
Expand All @@ -1429,7 +1427,6 @@ def test_edit_submission_and_force_post(self):
self.assertEqual(submission.document_date, document_date)
self.assertEqual(submission.abstract, "some abstract")
self.assertEqual(submission.pages, 123)
self.assertEqual(submission.note, "no comments")
self.assertEqual(submission.submitter, "Some Random Test Person <random@example.com>")
self.assertEqual(submission.replaces, draft.docalias.first().name)
self.assertEqual(submission.state_id, "manual")
Expand Down
4 changes: 2 additions & 2 deletions ietf/templates/doc/ballot/writeupnotes.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ <h1>
{% csrf_token %}
{% bootstrap_form ballot_writeup_form %}
<div class="form-text my-3">
Technical summary, Working Group summary, document quality, personnel, IRTF note, IESG note, IANA note. This text will be appended to all announcements and messages to the IRTF or RFC Editor.
Technical summary, Working Group summary, document quality, personnel, IANA note. This text will be appended to all announcements and messages to the IRTF or RFC Editor.
{% if ballot_issue_danger %}
<p class="text-danger">
This document has not completed IETF Last Call. Please do not issue the ballot early without good reason.
Expand All @@ -36,4 +36,4 @@ <h1>
Back
</a>
</form>
{% endblock %}
{% endblock %}
8 changes: 0 additions & 8 deletions ietf/templates/doc/charter/ballot_writeup.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,6 @@ RFC Editor Note

(Insert RFC Editor Note here or remove section)

IRTF Note

(Insert IRTF Note here or remove section)

IESG Note

(Insert IESG Note here or remove section)

IANA Note

(Insert IANA Note here or remove section)
Expand Down
2 changes: 1 addition & 1 deletion ietf/templates/doc/charter/ballot_writeupnotes.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ <h1>
<form class="mt-3" method="post">
{% csrf_token %}
{% bootstrap_form ballot_writeup_form %}
<div class="form-text mb-3">Working group summary, personnel, IAB note, IESG note, IANA note.</div>
<div class="form-text mb-3">Working group summary, personnel, IANA note.</div>
<button type="submit"
class="btn btn-primary"
name="save_ballot_writeup"
Expand Down
39 changes: 13 additions & 26 deletions ietf/templates/doc/document_draft.html
Original file line number Diff line number Diff line change
Expand Up @@ -408,32 +408,19 @@
{% endif %}
</td>
</tr>
{% if iesg_state.slug != 'idexists' %}
{% if doc.note or can_edit %}
<tr>
<td></td>
<th scope="row">
IESG note
</th>
<td class="edit">
{% if can_edit and not snapshot %}
<a class="btn btn-primary btn-sm"
href="{% url 'ietf.doc.views_draft.edit_iesg_note' name=doc.name %}">
Edit
</a>
{% endif %}
</td>
<td>
{% if doc.note %}
{{ doc.note|linebreaksbr }}
{% else %}
<span class="text-body-secondary">
(None)
</span>
{% endif %}
</td>
</tr>
{% endif %}
{% if iesg_state.slug != 'idexists' and doc.note %}
<tr>
<td></td>
<th scope="row">
IESG note
</th>
<td class="edit">
{# IESG Notes are historic and read-only now #}
</td>
<td>
{{ doc.notedoc.note|urlize_ietf_docs|linkify|linebreaksbr }}
</td>
</tr>
{% endif %}
<tr>
<td></td>
Expand Down
19 changes: 0 additions & 19 deletions ietf/templates/doc/draft/edit_iesg_note.html

This file was deleted.

7 changes: 0 additions & 7 deletions ietf/templates/doc/mail/ballot_writeup.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,6 @@ Personnel
Who is the Document Shepherd for this document? Who is the
Responsible Area Director?
{% endif %}
{% if doc.stream.slug == "irtf" %}IRTF Note

(Insert IRTF Note here or remove section)
{% elif doc.stream.slug == "ietf" %}IESG Note

(Insert IESG Note here or remove section)
{% endif %}
IANA Note
{% if iana %}
{% filter wordwrap:"76"|indent:2 %}{{ iana }}{% endfilter %}
Expand Down
4 changes: 2 additions & 2 deletions ietf/templates/iesg/agenda_conflict_doc.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{# Copyright The IETF Trust 2015, All Rights Reserved #}
{% load origin %}
{% origin %}
{% load ietf_filters ballot_icon person_filters %}
{% load ietf_filters ballot_icon person_filters textfilters %}
<div class="card mb-3">
<div class="position-absolute top-0 end-0 m-3">{% ballot_icon doc %}</div>
<div class="card-body">
Expand All @@ -27,7 +27,7 @@
{% if conflictdoc.note %}
<div class="row">
<div class="col-3 text-end fw-bold">Note</div>
<div class="col">{{ conflictdoc.note|linebreaksbr }}</div>
<div class="col">{{ conflictdoc.note|urlize_ietf_docs|linkify|linebreaksbr }}</div>
</div>
{% endif %}
<div class="row">
Expand Down
3 changes: 1 addition & 2 deletions ietf/templates/iesg/agenda_conflict_doc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@
{% filter wordwrap:"68"|indent|indent %}{{ doc.title }}{% endfilter %}
{{ conflictdoc.canonical_name }}-{{ conflictdoc.rev }}
{% filter wordwrap:"66"|indent:"4" %}{{ conflictdoc.title }} ({{ conflictdoc.stream }}: {{ conflictdoc.intended_std_level }}){% endfilter %}
{% if conflictdoc.note %}{# note: note is not escaped #} {% filter wordwrap:"64"|indent:"6" %}Note: {{ conflictdoc.note|striptags }}{% endfilter %}
{% endif %} Token: {{ doc.ad }}
Token: {{ doc.ad }}
{% with doc.active_defer_event as defer %}{% if defer %} Was deferred by {{defer.by}} on {{defer.time|date:"Y-m-d"}}{% endif %}{% endwith %}{% endwith %}
3 changes: 1 addition & 2 deletions ietf/templates/iesg/agenda_doc.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{% load ietf_filters %}{% with doc.rfc_number as rfc_number %}
o {{doc.canonical_name}}{% if not rfc_number %}-{{doc.rev}}{% endif %}{% endwith %}{%if doc.has_rfc_editor_note %} (Has RFC Editor Note){% endif %}{% if doc.stream %} - {{ doc.stream }} stream{% endif %}
{% filter wordwrap:"68"|indent|indent %}{{ doc.title }} ({{ doc.intended_std_level }}){% endfilter %}
{% if doc.note %}{# note: note is not escaped #} {% filter wordwrap:"68"|indent|indent %}Note: {{ doc.note|striptags }}{% endfilter %}
{% endif %} Token: {{ doc.ad }}{% if doc.iana_review_state %}
Token: {{ doc.ad }}{% if doc.iana_review_state %}
IANA Review: {{ doc.iana_review_state }}{% endif %}{% if doc.consensus %}
Consensus: {{ doc.consensus }}{% endif %}{% if doc.lastcall_expires %}
Last call expires: {{ doc.lastcall_expires|date:"Y-m-d" }}{% endif %}{% if doc.review_assignments %}
Expand Down
Loading