Skip to content

Commit

Permalink
Allow IAB Programs to be listed in meeting request conflicts. Ready f…
Browse files Browse the repository at this point in the history
…or merge. Fixes #3270.

 - Legacy-Id: 19052
  • Loading branch information
russhousley committed Jun 1, 2021
1 parent d8ec825 commit 45dcc10
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ietf/secr/sreq/forms.py
Expand Up @@ -27,7 +27,7 @@
# Helper Functions
# -------------------------------------------------
def allowed_conflicting_groups():
return Group.objects.filter(type__in=['wg', 'ag', 'rg', 'rag'], state__in=['bof', 'proposed', 'active'])
return Group.objects.filter(type__in=['wg', 'ag', 'rg', 'rag', 'program'], state__in=['bof', 'proposed', 'active'])

def check_conflict(groups, source_group):
'''
Expand Down
6 changes: 5 additions & 1 deletion ietf/secr/sreq/tests.py
Expand Up @@ -82,6 +82,8 @@ def test_edit(self):
group2 = GroupFactory()
group3 = GroupFactory()
group4 = GroupFactory()
iabprog = GroupFactory(type_id='program')

SessionFactory(meeting=meeting,group=mars,status_id='sched')

url = reverse('ietf.secr.sreq.views.edit', kwargs={'acronym':'mars'})
Expand All @@ -92,7 +94,7 @@ def test_edit(self):
'length_session1':'3600',
'length_session2':'3600',
'attendees':'10',
'conflict1':'',
'conflict1':iabprog.acronym,
'comments':'need lights',
'session_time_relation': 'subsequent-days',
'adjacent_with_wg': group2.acronym,
Expand All @@ -108,6 +110,8 @@ def test_edit(self):
sessions = Session.objects.filter(meeting=meeting, group=mars)
self.assertEqual(len(sessions), 2)
session = sessions[0]

self.assertEqual(session.constraints().get(name='conflict').target.acronym, iabprog.acronym)
self.assertEqual(session.constraints().get(name='time_relation').time_relation, 'subsequent-days')
self.assertEqual(session.constraints().get(name='wg_adjacent').target.acronym, group2.acronym)
self.assertEqual(
Expand Down

0 comments on commit 45dcc10

Please sign in to comment.