Skip to content

Commit 3a74805

Browse files
committed
Merged [4999] from jmh@joelhalpern.com:
Correct test of final shepherd update flag. - Legacy-Id: 5014 Note: SVN reference [4999] has been migrated to Git commit aba18e8
3 parents 5a5e368 + ca1ff2f + 2470ad7 commit 3a74805

11 files changed

Lines changed: 351 additions & 187 deletions

File tree

debug.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@
55
import syslog
66
write = syslog.syslog
77
except ImportError: # import syslog will fail on Windows boxes
8-
pass
9-
import sys
10-
write = lambda x: sys.stderr.write(x+"\n")
11-
12-
from pprint import pformat
8+
import sys
9+
write = lambda x: sys.stderr.write(x+"\n")
10+
try:
11+
from pprint import pformat
12+
except ImportError:
13+
pformat = lambda x: x
14+
1315
import cProfile
1416
try:
1517
from django.conf import settings

ietf/idrfc/views_ballot.py

Lines changed: 3 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -519,14 +519,6 @@ class Meta:
519519
def clean_ballot_writeup(self):
520520
return self.cleaned_data["ballot_writeup"].replace("\r", "")
521521

522-
class ApprovalTextForm(forms.ModelForm):
523-
class Meta:
524-
model = BallotInfo
525-
fields = ["approval_text"]
526-
527-
def clean_approval_text(self):
528-
return self.cleaned_data["approval_text"].replace("\r", "")
529-
530522
@group_required('Area_Director','Secretariat')
531523
def lastcalltext(request, name):
532524
"""Editing of the last call text"""
@@ -848,64 +840,15 @@ def ballot_writeupnotesREDESIGN(request, name):
848840
ballot_writeupnotes = ballot_writeupnotesREDESIGN
849841

850842

851-
@group_required('Area_Director','Secretariat')
852-
def ballot_approvaltext(request, name):
853-
"""Editing of approval text"""
854-
doc = get_object_or_404(InternetDraft, filename=name)
855-
if not doc.idinternal:
856-
raise Http404()
857-
858-
login = IESGLogin.objects.get(login_name=request.user.username)
859-
860-
try:
861-
ballot = doc.idinternal.ballot
862-
except BallotInfo.DoesNotExist:
863-
ballot = generate_ballot(request, doc)
864-
865-
approval_text_form = ApprovalTextForm(instance=ballot)
866-
867-
if request.method == 'POST':
868-
869-
if "save_approval_text" in request.POST:
870-
approval_text_form = ApprovalTextForm(request.POST, instance=ballot)
871-
if approval_text_form.is_valid():
872-
ballot.approval_text = approval_text_form.cleaned_data["approval_text"]
873-
add_document_comment(request, doc, "Approval announcement text changed")
874-
ballot.save()
875-
876-
if "regenerate_approval_text" in request.POST:
877-
ballot.approval_text = generate_approval_mail(request, doc)
878-
add_document_comment(request, doc, "Approval announcement text regenerated")
879-
ballot.save()
880-
881-
# make sure form has the updated text
882-
approval_text_form = ApprovalTextForm(instance=ballot)
883-
884-
doc.idinternal.event_date = date.today()
885-
doc.idinternal.save()
886-
887-
can_announce = doc.idinternal.cur_state_id > 19
888-
docs_with_invalid_status = [d.document().file_tag() for d in doc.idinternal.ballot_set() if "None" in d.document().intended_status.intended_status or "Request" in d.document().intended_status.intended_status]
889-
need_intended_status = ", ".join(docs_with_invalid_status)
890-
891-
return render_to_response('idrfc/ballot_approvaltext.html',
892-
dict(doc=doc,
893-
back_url=doc.idinternal.get_absolute_url(),
894-
ballot=ballot,
895-
approval_text_form=approval_text_form,
896-
can_announce=can_announce,
897-
need_intended_status=need_intended_status,
898-
),
899-
context_instance=RequestContext(request))
900843

901-
class ApprovalTextFormREDESIGN(forms.Form):
844+
class ApprovalTextForm(forms.Form):
902845
approval_text = forms.CharField(widget=forms.Textarea, required=True)
903846

904847
def clean_approval_text(self):
905848
return self.cleaned_data["approval_text"].replace("\r", "")
906849

907850
@group_required('Area_Director','Secretariat')
908-
def ballot_approvaltextREDESIGN(request, name):
851+
def ballot_approvaltext(request, name):
909852
"""Editing of approval text"""
910853
doc = get_object_or_404(Document, docalias__name=name)
911854
if not doc.get_state("draft-iesg"):
@@ -936,7 +879,7 @@ def ballot_approvaltextREDESIGN(request, name):
936879
e = generate_approval_mail(request, doc)
937880

938881
# make sure form has the updated text
939-
form = ApprovalTextForm(initial=dict(approval_text=existing.text))
882+
form = ApprovalTextForm(initial=dict(approval_text=e.text))
940883

941884
can_announce = doc.get_state("draft-iesg").order > 19
942885
need_intended_status = ""
@@ -952,9 +895,6 @@ def ballot_approvaltextREDESIGN(request, name):
952895
),
953896
context_instance=RequestContext(request))
954897

955-
if settings.USE_DB_REDESIGN_PROXY_CLASSES:
956-
ApprovalTextForm = ApprovalTextFormREDESIGN
957-
ballot_approvaltext = ballot_approvaltextREDESIGN
958898

959899
@group_required('Secretariat')
960900
def approve_ballot(request, name):

ietf/meeting/views.py

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
from django.db.models import Max
2222

2323
import debug
24+
import urllib
2425

2526
from ietf.idtracker.models import InternetDraft
2627
from ietf.utils.pipe import pipe
@@ -427,22 +428,33 @@ def ical_agenda(request, num=None):
427428
q = request.META.get('QUERY_STRING','') or ""
428429
filter = q.lower().replace('%2c',',').split(',');
429430
include = set(filter)
430-
include_types = ["Plenary","Other"]
431+
include_types = set(["Plenary","Other"])
431432
exclude = []
432433

433434
# Process the special flags.
435+
# "-wgname" will remove a working group from the output.
436+
# "~Type" will add that type to the output.
437+
# "-~Type" will remove that type from the output
438+
# Current types are:
439+
# Session, Other (default on), Break, Plenary (default on)
440+
# Non-Working Group "wg names" include:
441+
# edu, ietf, tools, iesg, iab
442+
434443
for item in include:
435444
if item:
436-
if item[0] == '-':
445+
if item[0] == '-' and item[1] == '~':
446+
include_types -= set([item[2:3].upper()+item[3:]])
447+
elif item[0] == '-':
437448
exclude.append(item[1:])
438-
if item[0] == '~':
439-
include_types.append(item[1:2].upper()+item[2:])
449+
elif item[0] == '~':
450+
include_types |= set([item[1:2].upper()+item[2:]])
440451

441452
timeslots = TimeSlot.objects.filter(Q(meeting__id = meeting.id),
442453
Q(type__name__in = include_types) |
443454
Q(session__group__acronym__in = filter) |
444455
Q(session__group__parent__acronym__in = filter)
445-
)#.exclude(Q(session__group__isnull = False),
456+
).exclude(Q(session__group__acronym__in = exclude))
457+
#.exclude(Q(session__group__isnull = False),
446458
#Q(session__group__acronym__in = exclude) |
447459
#Q(session__group__parent__acronym__in = exclude))
448460

ietf/submit/forms.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
from django.utils.html import mark_safe
1313
from django.core.urlresolvers import reverse as urlreverse
1414

15+
import debug
16+
1517
from ietf.idtracker.models import InternetDraft, IETFWG
1618
from ietf.proceedings.models import Meeting
1719
from ietf.submit.models import IdSubmissionDetail, TempIdAuthors, Preapproval
@@ -204,6 +206,7 @@ def get_draft(self):
204206
txt_file.seek(0)
205207
return self.draft
206208

209+
@debug.trace
207210
def save(self):
208211
for ext in ['txt', 'pdf', 'xml', 'ps']:
209212
fd = self.cleaned_data[ext]
@@ -334,11 +337,13 @@ def get_author_buttons(self):
334337
'full_name': full_name})
335338
return ''.join(buttons)
336339

340+
@debug.trace
337341
def save(self, request):
338342
self.save_submitter_info()
339343
self.save_new_draft_info()
340344
self.send_confirmation_mail(request)
341345

346+
@debug.trace
342347
def send_confirmation_mail(self, request):
343348
subject = 'Confirmation for Auto-Post of I-D %s' % self.draft.filename
344349
from_email = settings.IDSUBMIT_FROM_EMAIL
@@ -526,10 +531,12 @@ def save_new_draft_info(self):
526531
author_order=i + 1,
527532
submission=draft)
528533

534+
@debug.trace
529535
def save(self, request):
530536
self.save_new_draft_info()
531537
self.send_mail_to_secretariat(request)
532538

539+
@debug.trace
533540
def send_mail_to_secretariat(self, request):
534541
subject = 'Manual Post Requested for %s' % self.draft.filename
535542
from_email = settings.IDSUBMIT_FROM_EMAIL

ietf/templates/idrfc/ballot_writeups.html

Lines changed: 0 additions & 90 deletions
This file was deleted.

ietf/templates/idrfc/doc_tab_document.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
{% else %}
5959
{% if stream_info.stream.name == 'ISE' or stream_info.stream.name == 'IRTF' %}
6060
{% if user|in_group:"Secretariat" and not info.conflict_reviews %}
61-
<span id="doc_conflict_review_button" class="yui-button yui-link-button" style="margin-left:2px;">{% url conflict_review_start name=doc.draft_name as start_review_url %}{% if start_review_url %}<span class="first-child"><a href="{{start_review_url}}">Begin IETF Conflict Review</a></span>{% endif %}</span>
61+
<span id="doc_conflict_review_button" class="yui-button yui-link-button" style="margin-left:2px;">{% url conflict_review_start name=doc.draft_name as start_review_url %}{% if start_review_url %}<span class="first-child"><a href="{{start_review_url}}">Begin IETF Conflict Review {% if not doc.underlying_document.intended_std_level %}(note that intended status is not set){% endif %}</a></span>{% endif %}</span>
6262
{% endif %}
6363
{% else %}
6464
{% if stream_info.stream.name == 'IETF'%}{%if not doc.in_ietf_process %}

ietf/templates/idrfc/doc_tab_document_id.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
<tr><td>Intended RFC status:</td><td>
5959
{% with user|in_group:"Area_Director,Secretariat" as add_link %}
6060
{% if add_link %}<a class="editlink" href="{% url doc_change_intended_status name=doc.draft_name %}">{% endif %}
61-
{{ doc.underlying_document.intended_std_level|default:"-" }}
61+
{{ doc.underlying_document.intended_std_level|default:"(None)" }}
6262
{% if add_link %}</a>{% endif %}
6363
{% endwith %}
6464
</td></tr>
@@ -142,7 +142,7 @@
142142
<tr><td>Responsible AD:</td><td>
143143
{% with user|in_group:"Area_Director,Secretariat" as add_link %}
144144
{% if add_link %}<a class="editlink" href="{% url doc_change_ad name=doc.draft_name %}">{% endif %}
145-
{% if doc.in_ietf_process %}{{ doc.ietf_process.ad_name|default:"-"|escape }}{%else%}-{%endif%}
145+
{% if doc.in_ietf_process %}{{ doc.ietf_process.ad_name|default:"(None)"|escape }}{%else%}(None){%endif%}
146146
{% if add_link %}</a>{% endif %}
147147
{% endwith %}
148148
</td></tr>

0 commit comments

Comments
 (0)