Skip to content

Commit 1ba8996

Browse files
committed
Merged in [9603] from rjsparks@nostrum.com:
Added functionality which allows the secretariat to manage more meeting types, including leadership meetings. Backfilled those types of meetings from IETF91 and IETF92. Addressed several facelift issues in the meeting application. - Legacy-Id: 9606 Note: SVN reference [9603] has been migrated to Git commit a85424a
2 parents d713728 + a85424a commit 1ba8996

36 files changed

Lines changed: 876 additions & 75 deletions

ietf/bin/create-break-sessions

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ scheduled = SessionStatusName.objects.get(slug='sched')
2222

2323
for meeting in Meeting.objects.filter(type="ietf").order_by("date"):
2424
print "Checking %s schedules ..." % meeting
25-
brk, __ = Session.objects.get_or_create(meeting=meeting, group=secretariat, requested_by=system, status=scheduled, name='Break', )
26-
reg, __ = Session.objects.get_or_create(meeting=meeting, group=secretariat, requested_by=system, status=scheduled, name='Registration', )
25+
brk, __ = Session.objects.get_or_create(meeting=meeting, group=secretariat, requested_by=system, status=scheduled, name='Break', type_id='break',)
26+
reg, __ = Session.objects.get_or_create(meeting=meeting, group=secretariat, requested_by=system, status=scheduled, name='Registration', type_id='reg',)
2727

2828
for schedule in meeting.schedule_set.all():
2929
print " Checking for missing Break and Reg sessions in %s" % schedule

ietf/doc/tests.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -527,6 +527,7 @@ def test_document_material(self):
527527
status = SessionStatusName.objects.create(slug='scheduled', name='Scheduled'),
528528
modified = datetime.datetime.now(),
529529
requested_by = Person.objects.get(user__username="marschairman"),
530+
type_id = "session",
530531
)
531532
SessionPresentation.objects.create(session=session, document=doc, rev=doc.rev)
532533

ietf/doc/tests_material.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ def test_revise(self):
148148
status = SessionStatusName.objects.create(slug='scheduled', name='Scheduled'),
149149
modified = datetime.datetime.now(),
150150
requested_by = Person.objects.get(user__username="marschairman"),
151+
type_id="session",
151152
)
152153
SessionPresentation.objects.create(session=session, document=doc, rev=doc.rev)
153154

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# -*- coding: utf-8 -*-
2+
from __future__ import unicode_literals
3+
4+
from django.db import migrations
5+
6+
def create_iab_roles(apps, schema_editor):
7+
Role = apps.get_model('group','Role')
8+
Group = apps.get_model('group','Group')
9+
Person = apps.get_model('person','Person')
10+
11+
iab = Group.objects.get(acronym='iab')
12+
13+
iab_names = [
14+
'Jari Arkko',
15+
'Mary Barnes',
16+
'Marc Blanchet',
17+
'Ralph Droms',
18+
'Ted Hardie',
19+
'Joe Hildebrand',
20+
'Russ Housley',
21+
'Erik Nordmark',
22+
'Robert Sparks',
23+
'Andrew Sullivan',
24+
'Dave Thaler',
25+
'Brian Trammell',
26+
'Suzanne Woolf',
27+
]
28+
29+
for name in iab_names:
30+
person = Person.objects.get(name=name)
31+
person.role_set.add(Role(name_id='member',group=iab,person=person,email_id=person.email_set.filter(active=True).order_by('-time').first().address))
32+
33+
34+
class Migration(migrations.Migration):
35+
36+
dependencies = [
37+
('group', '0004_auto_20150430_0847'),
38+
]
39+
40+
operations = [
41+
migrations.RunPython(create_iab_roles),
42+
]

ietf/ietfauth/utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ def has_role(user, role_names, *args, **kwargs):
4646
role_qs = {
4747
"Area Director": Q(person=person, name__in=("pre-ad", "ad"), group__type="area", group__state="active"),
4848
"Secretariat": Q(person=person, name="secr", group__acronym="secretariat"),
49+
"IAB" : Q(person=person, name="member", group__acronym="iab"),
4950
"IANA": Q(person=person, name="auth", group__acronym="iana"),
5051
"RFC Editor": Q(person=person, name="auth", group__acronym="rfceditor"),
5152
"ISE" : Q(person=person, name="chair", group__acronym="ise"),

ietf/meeting/ajax.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,8 @@ def timeslot_roomurl(request, num=None, roomid=None):
158158
# no authorization required to list.
159159
def timeslot_slotlist(request, mtg):
160160
slots = mtg.timeslot_set.all()
161+
# Restrict graphical editing to slots of type 'session' for now
162+
slots = slots.filter(type__slug='session')
161163
json_array=[]
162164
for slot in slots:
163165
json_array.append(slot.json_dict(request.build_absolute_uri('/')))

ietf/meeting/helpers.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def build_all_agenda_slices(meeting):
6666
time_slices = []
6767
date_slices = {}
6868

69-
for ts in meeting.timeslot_set.exclude(type__in=['reg','break']).order_by('time','name'):
69+
for ts in meeting.timeslot_set.filter(type__in=['session',]).order_by('time','name'):
7070
ymd = ts.time.date()
7171

7272
if ymd not in date_slices and ts.location != None:
@@ -80,13 +80,10 @@ def build_all_agenda_slices(meeting):
8080
time_slices.sort()
8181
return time_slices,date_slices
8282

83-
def get_scheduledsessions_from_schedule(schedule):
84-
ss = schedule.scheduledsession_set.filter(timeslot__location__isnull = False).exclude(session__isnull = True).order_by('timeslot__time','timeslot__name','session__group__group')
85-
86-
return ss
87-
8883
def get_all_scheduledsessions_from_schedule(schedule):
89-
ss = schedule.scheduledsession_set.filter(timeslot__location__isnull = False).order_by('timeslot__time','timeslot__name')
84+
ss = schedule.scheduledsession_set.filter(timeslot__location__isnull = False)
85+
ss = ss.filter(session__type__slug='session')
86+
ss = ss.order_by('timeslot__time','timeslot__name')
9087

9188
return ss
9289

Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
# -*- coding: utf-8 -*-
2+
from __future__ import unicode_literals
3+
4+
import datetime
5+
from django.db import migrations
6+
7+
8+
def backfill_91_other_meetings(apps, schema_editor):
9+
10+
Meeting = apps.get_model('meeting', 'Meeting')
11+
Schedule = apps.get_model('meeting', 'Schedule')
12+
ScheduledSession = apps.get_model('meeting', 'ScheduledSession')
13+
Room = apps.get_model('meeting', 'Room')
14+
Group = apps.get_model('group', 'Group')
15+
Person = apps.get_model('person', 'Person')
16+
17+
ietf91 = Meeting.objects.filter(number=91).first()
18+
19+
if not ietf91:
20+
print "IETF91 not found, no data changed"
21+
else:
22+
agenda91 = Schedule.objects.get(meeting=ietf91,pk=ietf91.agenda.pk)
23+
24+
south_pacific_1 = Room.objects.get(meeting=ietf91,name="South Pacific 1")
25+
south_pacific_2 = Room.objects.get(meeting=ietf91,name="South Pacific 2")
26+
rainbow_12 = Room.objects.get(meeting=ietf91,name="Rainbow Suite 1/2")
27+
lehua_suite = Room.objects.get(meeting=ietf91,name="Lehua Suite")
28+
kahili = Room.objects.get(meeting=ietf91,name="Kahili")
29+
coral_2 = Room.objects.get(meeting=ietf91,name="Coral 2")
30+
31+
south_pacific_3 = Room.objects.create(meeting=ietf91,name="South Pacific 3",capacity=20)
32+
rainbow_suite_3 = Room.objects.create(meeting=ietf91,name="Rainbow Suite 3",capacity=20)
33+
rainbow_23 = Room.objects.create(meeting=ietf91,name="Rainbow Suite 2/3",capacity=210)
34+
south_pacific_34 = Room.objects.create(meeting=ietf91,name="South Pacific 3/4",capacity=210)
35+
iolani_67 = Room.objects.create(meeting=ietf91,name="Iolani 6/7",capacity=40)
36+
sea_pearl_12 = Room.objects.create(meeting=ietf91,name="Sea Pearl 1/2",capacity=40)
37+
sea_pearl_2 = Room.objects.create(meeting=ietf91,name="Sea Pearl 2",capacity=20)
38+
coral_lounge = Room.objects.create(meeting=ietf91,name="Coral Lounge", capacity=1200)
39+
hibiscus = Room.objects.create(meeting=ietf91,name="Hibiscus", capacity=20)
40+
tiare = Room.objects.create(meeting=ietf91,name="Tiare Suite", capacity=20)
41+
42+
iesg = Group.objects.get(acronym='iesg')
43+
iab = Group.objects.get(acronym='iab')
44+
rsoc = Group.objects.get(acronym='rsoc')
45+
iaoc = Group.objects.get(acronym='iaoc')
46+
nomcom = Group.objects.get(acronym='nomcom2014')
47+
isoc = Group.objects.get(acronym='isoc')
48+
secr = Group.objects.get(acronym='secretariat')
49+
isocbot = Group.objects.create(acronym='isocbot',name="Internet Society Board of Trustees",state_id='active',type_id='isoc',parent=isoc)
50+
isocfell = Group.objects.create(acronym='isocfell',name="Internet Society Fellows",state_id='active',type_id='isoc',parent=isoc)
51+
52+
system = Person.objects.get(name='(System)')
53+
54+
for d, h, m, duration, type_id, groups, room, slotname, label in [
55+
( 9, 8, 0, 120, 'offagenda', [secr], rainbow_suite_3, 'WEIRDS Interop', 'WEIRDS Interop'),
56+
( 9, 8, 30, 90, 'lead', [iesg], south_pacific_2, 'Breakfast', None),
57+
( 9, 9, 0, 240, 'offagenda', [secr], lehua_suite, 'RMCAT Interim', 'RMCAT Interim Meeting'),
58+
( 9, 9, 0, 60, 'lead', [nomcom], iolani_67, 'Breakfast', 'Nomcom Breakfast'),
59+
( 9, 9, 0, 150, 'lead', [iesg], south_pacific_2, 'Meeting', None),
60+
( 9, 9, 0, 360, 'offagenda', [secr], hibiscus, 'Meeting', 'RootOPS'),
61+
( 9, 9, 30, 360, 'offagenda', [secr], kahili, 'TLS Interim', 'TLS WG Interim'),
62+
( 9, 11, 0, 480, 'offagenda', [secr], coral_lounge, 'T-Shirt Distribution', 'T-shirt Distribution'),
63+
( 9, 11, 30, 150, 'lead', [iesg], south_pacific_2, 'Lunch', 'IESG Lunch with the IAB'),
64+
( 9, 11, 30, 150, 'lead', [iab], south_pacific_2, 'Lunch', 'IAB Lunch with the IESG'),
65+
( 9, 12, 0, 360, 'offagenda', [secr], south_pacific_1, 'Terminal Room', 'Terminal Room Open to Attendees'),
66+
( 9, 14, 0, 180, 'lead', [iab], south_pacific_2, 'Meeting', None),
67+
( 9, 16, 0, 120, 'offagenda', [secr], coral_2, 'Meeting', 'Web Object Encryption'),
68+
( 9, 17, 0, 120, 'offagenda', [secr], sea_pearl_12, 'Reception', "Companion's Reception"), # Should this appear on agenda?
69+
( 9, 19, 0, 180, 'offagenda', [isocfell], rainbow_23, 'Dinner', 'ISOC Fellows Reception/Dinner'),
70+
( 9, 19, 0, 180, 'offagenda', [secr], lehua_suite, 'Meeting', 'Huawei'),
71+
( 9, 21, 0, 180, 'lead', [secr], sea_pearl_12, 'Gathering', 'AMS/IESG/IAB/IAOC Gathering'),
72+
( 10, 0, 0, 1440, 'offagenda', [secr], south_pacific_1, 'Terminal Room', 'Terminal Room Open to Attendees'),
73+
( 10, 7, 0, 120, 'lead', [iesg], south_pacific_2, 'Breakfast', 'IESG Breakfast with the IAB'),
74+
( 10, 7, 0, 120, 'lead', [iab], south_pacific_2, 'Breakfast', 'IAB Breakfast with the IESG'),
75+
( 10, 7, 0, 120, 'lead', [nomcom], iolani_67, 'Breakfast', 'Nomcom Breakfast'),
76+
( 10, 8, 0, 600, 'offagenda', [secr], coral_lounge, 'T-shirt Distribution', 'T-shirt Distribution'),
77+
( 10, 11, 30, 90, 'offagenda', [secr], south_pacific_2, 'Meeting', 'OPS Directorate Meeting'),
78+
( 10, 11, 30, 90, 'offagenda', [secr], rainbow_suite_3, 'Meeting', 'IETF/3GPP Meeting'),
79+
( 10, 11, 30, 90, 'offagenda', [secr], lehua_suite, 'Meeting', 'RTG Area Meeting'),
80+
( 10, 19, 0, 240, 'offagenda', [secr], south_pacific_2, 'Meeting', 'Huawei'),
81+
( 11, 0, 0, 1440, 'offagenda', [secr], south_pacific_1, 'Terminal Room', 'Terminal Room Open to Attendees'),
82+
( 11, 7, 0, 120, 'lead', [iesg], south_pacific_2, 'Breakfast', None),
83+
( 11, 7, 0, 120, 'lead', [nomcom], iolani_67, 'Breakfast', 'Nomcom Breakfast'),
84+
( 11, 7, 0, 120, 'lead', [iab], rainbow_suite_3, 'Breakfast', None),
85+
( 11, 7, 0, 60, 'lead', [iab], tiare, 'Meeting', 'Vendor Selection Committee Meeting'),
86+
( 11, 8, 0, 600, 'offagenda', [secr], coral_lounge, 'T-shirt Distribution', 'T-shirt Distribution'),
87+
( 11, 9, 0, 90, 'offagenda', [secr], south_pacific_2, 'Meeting', 'DHCPv6bis Team Meeting'),
88+
( 11, 11, 30, 90, 'offagenda', [secr], south_pacific_2, 'Meeting', 'SECdir Meeting'),
89+
( 11, 11, 30, 90, 'offagenda', [secr], rainbow_suite_3, 'Lunch', 'RSAG/ISEB Lunch'),
90+
( 11, 16, 0, 240, 'offagenda', [secr], south_pacific_2, 'Meeting', 'Verisign Corporate Meeting'),
91+
( 12, 0, 0, 1440, 'offagenda', [secr], south_pacific_1, 'Terminal Room', 'Terminal Room Open to Attendees'),
92+
( 12, 7, 30, 90, 'lead', [iaoc], south_pacific_3, 'Breakfast', None),
93+
( 12, 7, 0, 120, 'lead', [nomcom], iolani_67, 'Breakfast', 'Nomcom Breakfast'),
94+
( 12, 8, 0, 540, 'offagenda', [secr], coral_lounge, 'T-shirt Distribution', 'T-shirt Distribution'),
95+
( 12, 8, 0, 240, 'offagenda', [secr], south_pacific_2, 'Meeting', 'DIME WG'),
96+
( 12, 11, 30, 90, 'offagenda', [secr], rainbow_suite_3, 'Lunch', 'RFC Editor Lunch'),
97+
( 12, 15, 0, 120, 'offagenda', [secr], south_pacific_2, 'Meeting', 'YANG Advice'),
98+
( 12, 17, 0, 240, 'offagenda', [secr], rainbow_suite_3, 'Meeting', 'Huawei (POC Wil Liu)'),
99+
( 12, 20, 0, 150, 'offagenda', [secr], south_pacific_2, 'Meeting', 'ICANN SSAC'),
100+
( 13, 0, 0, 1440, 'offagenda', [secr], south_pacific_1, 'Terminal Room', 'Terminal Room Open to Attendees'),
101+
( 13, 7, 0, 120, 'lead', [iab], rainbow_suite_3, 'Breakfast', None),
102+
( 13, 7, 0, 120, 'lead', [nomcom], iolani_67, 'Breakfast', 'Nomcom Breakfast'),
103+
( 13, 11, 30, 90, 'lead', [iab], sea_pearl_2, 'Meeting', 'IAB Liaison Oversight'),
104+
( 13, 11, 30, 90, 'lead', [rsoc], rainbow_suite_3, 'Lunch', None),
105+
( 14, 0, 0, 900, 'offagenda', [secr], south_pacific_1, 'Terminal Room', 'Terminal Room Open to Attendees'),
106+
( 14, 7, 0, 120, 'lead', [nomcom], iolani_67, 'Breakfast', 'Nomcom Breakfast'),
107+
( 14, 11, 0, 360, 'offagenda', [isoc], south_pacific_34,'Meeeting', 'ISOC AC Meeting'),
108+
( 14, 13, 30, 90, 'lead', [iesg], south_pacific_2, 'Lunch', 'IESG Lunch with the IAB'),
109+
( 14, 13, 30, 90, 'lead', [iab], south_pacific_2, 'Lunch', 'IAB Lunch with the IESG'),
110+
( 14, 18, 0, 60, 'offagenda', [isocbot], rainbow_23, 'Reception', 'ISOC Board Reception for IETF Leadership'),
111+
( 14, 19, 0, 180, 'offagenda', [isocbot], rainbow_23, 'Dinner', 'ISOC Board Dinner for IETF Leadership'),
112+
( 15, 8, 0, 60, 'offagenda', [isocbot], rainbow_12, 'Breakfast', 'ISOC Board of Trustees Breakfast'),
113+
( 15, 8, 0, 540, 'offagenda', [isocbot], south_pacific_34,'Meeting', 'ISOC Board of Trustees Meeting'),
114+
( 15, 12, 0, 60, 'offagenda', [isocbot], rainbow_12, 'Lunch', 'ISOC Board of Trustees Lunch'),
115+
( 16, 8, 0, 60, 'offagenda', [isocbot], rainbow_12, 'Breakfast', 'ISOC Board of Trustees Breakfast'),
116+
( 16, 8, 0, 540, 'offagenda', [isocbot], south_pacific_34,'Meeting', 'ISOC Board of Trustees Meeting'),
117+
( 16, 12, 0, 60, 'offagenda', [isocbot], rainbow_12, 'Lunch', 'ISOC Board of Trustees Lunch'),
118+
]:
119+
ts = ietf91.timeslot_set.create(type_id=type_id, name=slotname,
120+
time=datetime.datetime(2014,11,d,h,m,0),
121+
duration=datetime.timedelta(minutes=duration),
122+
location=room,show_location=(type_id not in ['lead','offagenda']))
123+
for group in groups:
124+
session = ietf91.session_set.create(name= label or "%s %s"%(group.acronym.upper(),slotname),
125+
group=group, attendees=25,
126+
requested=datetime.datetime(2014,11,1,0,0,0),
127+
requested_by=system, status_id='sched')
128+
ScheduledSession.objects.create(schedule=agenda91, timeslot=ts, session=session)
129+
130+
131+
132+
133+
class Migration(migrations.Migration):
134+
135+
dependencies = [
136+
('meeting', '0005_auto_20150430_0847'),
137+
('name', '0004_auto_20150318_1140'),
138+
('group', '0004_auto_20150430_0847'),
139+
('person', '0004_auto_20150308_0440'),
140+
]
141+
142+
operations = [
143+
migrations.RunPython(backfill_91_other_meetings)
144+
]
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# -*- coding: utf-8 -*-
2+
from __future__ import unicode_literals
3+
4+
from django.db import models, migrations
5+
6+
def extract_session_type_values(apps, schema_editor):
7+
8+
Session = apps.get_model('meeting', 'Session')
9+
10+
for s in Session.objects.all():
11+
t = s.scheduledsession_set.filter(schedule=models.F('schedule__meeting__agenda')).first()
12+
if t and t.timeslot.type.slug != 'session':
13+
s.type = t.timeslot.type
14+
s.save()
15+
16+
class Migration(migrations.Migration):
17+
18+
dependencies = [
19+
('name', '0004_auto_20150318_1140'),
20+
('meeting', '0006_auto_20150318_1116'),
21+
]
22+
23+
operations = [
24+
migrations.AddField(
25+
model_name='session',
26+
name='type',
27+
field=models.ForeignKey(default='session', to='name.TimeSlotTypeName'),
28+
preserve_default=False,
29+
),
30+
migrations.RunPython(extract_session_type_values),
31+
]
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# -*- coding: utf-8 -*-
2+
from __future__ import unicode_literals
3+
4+
from django.db import models, migrations
5+
6+
def extract_room_session_type_values(apps, schema_editor):
7+
8+
Room = apps.get_model('meeting', 'Room')
9+
10+
for r in Room.objects.all():
11+
for ts in r.timeslot_set.all():
12+
if ts.scheduledsession_set.filter(schedule=models.F('schedule__meeting__agenda')):
13+
r.session_types.add(ts.type)
14+
15+
class Migration(migrations.Migration):
16+
17+
dependencies = [
18+
('name', '0004_auto_20150318_1140'),
19+
('meeting', '0007_auto_20150429_1224'),
20+
]
21+
22+
operations = [
23+
migrations.AddField(
24+
model_name='room',
25+
name='session_types',
26+
field=models.ManyToManyField(to='name.TimeSlotTypeName', blank=True),
27+
preserve_default=True,
28+
),
29+
migrations.RunPython(extract_room_session_type_values),
30+
]

0 commit comments

Comments
 (0)