From 17786527d426bb23df5d761b5e5939b967992866 Mon Sep 17 00:00:00 2001 From: Robert Sparks Date: Fri, 19 Aug 2022 09:11:44 -0500 Subject: [PATCH] fix: allow 90m session requests. Prompt for cannot meet at time reasoning. (#4345) * fix: allow 90m session requests. Prompt for cannot meet at time reasoning. * test: adjust tests to match new acts_like_wg default. --- ietf/meeting/forms.py | 2 +- ietf/meeting/tests_schedule_forms.py | 4 ++-- ietf/secr/sreq/forms.py | 5 ----- ietf/secr/templates/includes/sessions_request_form.html | 2 +- 4 files changed, 4 insertions(+), 9 deletions(-) diff --git a/ietf/meeting/forms.py b/ietf/meeting/forms.py index 04885cfc8..183c8ff32 100644 --- a/ietf/meeting/forms.py +++ b/ietf/meeting/forms.py @@ -666,7 +666,7 @@ class TimeSlotCreateForm(forms.Form): class DurationChoiceField(forms.ChoiceField): def __init__(self, durations=None, *args, **kwargs): if durations is None: - durations = (3600, 7200) + durations = (3600, 5400, 7200) super().__init__( choices=self._make_choices(durations), *args, **kwargs, diff --git a/ietf/meeting/tests_schedule_forms.py b/ietf/meeting/tests_schedule_forms.py index 416498235..58c1332bd 100644 --- a/ietf/meeting/tests_schedule_forms.py +++ b/ietf/meeting/tests_schedule_forms.py @@ -264,7 +264,7 @@ class TimeSlotCreateFormTests(TestCase): class DurationChoiceFieldTests(TestCase): def test_choices_default(self): f = DurationChoiceField() - self.assertEqual(f.choices, [('', '--Please select'), ('3600', '1 hour'), ('7200', '2 hours')]) + self.assertEqual(f.choices, [('', '--Please select'), ('3600', '1 hour'), ('5400', '1 hour 30 minutes'), ('7200', '2 hours')]) def test_choices(self): f = DurationChoiceField([60, 1800, 3600, 5400, 7260, 7261]) @@ -343,7 +343,7 @@ class SessionDetailsFormTests(TestCase): self.assertTrue(self.group.features.acts_like_wg) self.assertEqual( SessionDetailsForm(group=self.group).fields['requested_duration'].choices, - [('', '--Please select'), ('3600', '1 hour'), ('7200', '2 hours')], + [('', '--Please select'), ('3600', '1 hour'), ('5400', '1 hour 30 minutes'), ('7200', '2 hours')], ) self.group.features.acts_like_wg = False self.group.features.save() diff --git a/ietf/secr/sreq/forms.py b/ietf/secr/sreq/forms.py index baba79c97..44df58de4 100644 --- a/ietf/secr/sreq/forms.py +++ b/ietf/secr/sreq/forms.py @@ -22,11 +22,6 @@ from ietf.utils import log NUM_SESSION_CHOICES = (('','--Please select'),('1','1'),('2','2')) SESSION_TIME_RELATION_CHOICES = (('', 'No preference'),) + Constraint.TIME_RELATION_CHOICES JOINT_FOR_SESSION_CHOICES = (('1', 'First session'), ('2', 'Second session'), ('3', 'Third session'), ) -# Used for traditional face-to-face meetings: -# LENGTH_SESSION_CHOICES = (('','--Please select'),('1800','30 minutes'),('3600','1 hour'),('5400','1.5 hours'), ('7200','2 hours'),('9000','2.5 hours')) -# Used for totally virtual meetings during COVID-19: -# LENGTH_SESSION_CHOICES = (('','--Please select'),('3000','50 minutes'),('6000','100 minutes')) -LENGTH_SESSION_CHOICES = (('','--Please select'),('3600','60 minutes'),('7200','120 minutes')) # ------------------------------------------------- # Helper Functions diff --git a/ietf/secr/templates/includes/sessions_request_form.html b/ietf/secr/templates/includes/sessions_request_form.html index eacaeef13..3071af16c 100755 --- a/ietf/secr/templates/includes/sessions_request_form.html +++ b/ietf/secr/templates/includes/sessions_request_form.html @@ -78,7 +78,7 @@ - Times during which this WG can not meet: + Times during which this WG can not meet:
Please explain any selections in Special Requests below. {{ form.timeranges.errors }}{{ form.timeranges }}