Skip to content

Commit 93fe2e5

Browse files
committed
Merged in [19301] [19303] [19304] from rjsparks@nostrum.com:
Include new conflict types in the session request notification email. Fixes ietf-tools#3381. - Legacy-Id: 19324 Note: SVN reference [19301] has been migrated to Git commit 7db9801 Note: SVN reference [19303] has been migrated to Git commit 5f465ca Note: SVN reference [19304] has been migrated to Git commit 05390eb
2 parents a6205c3 + 05390eb commit 93fe2e5

3 files changed

Lines changed: 8 additions & 7 deletions

File tree

ietf/secr/sreq/tests.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,7 @@ def test_request_notification(self):
395395
group = GroupFactory(acronym='ames', parent=area)
396396
group2 = GroupFactory(acronym='ames2', parent=area)
397397
group3 = GroupFactory(acronym='ames2', parent=area)
398+
group4 = GroupFactory(acronym='ames3', parent=area)
398399
RoleFactory(name_id='chair', group=group, person__user__username='ameschairman')
399400
resource = ResourceAssociation.objects.create(name_id='project')
400401
# Bit of a test data hack - the fixture now has no used resources to pick from
@@ -409,7 +410,7 @@ def test_request_notification(self):
409410
'length_session2':'3600',
410411
'attendees':'10',
411412
'bethere':str(ad.pk),
412-
'constraint_chair_conflict':'',
413+
'constraint_chair_conflict':group4.acronym,
413414
'comments':'',
414415
'resources': resource.pk,
415416
'session_time_relation': 'subsequent-days',
@@ -450,6 +451,8 @@ def test_request_notification(self):
450451
self.assertTrue("Can't meet: Thursday early afternoon, Thursday late" in notification_payload)
451452
self.assertTrue('Second session joint with: {}'.format(group3.acronym) in notification_payload)
452453
self.assertTrue(ad.ascii_name() in notification_payload)
454+
self.assertIn(ConstraintName.objects.get(slug='chair_conflict').name, notification_payload)
455+
self.assertIn(group.acronym, notification_payload)
453456

454457
class LockAppTestCase(TestCase):
455458
def setUp(self):

ietf/secr/sreq/views.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,7 @@ def confirm(request, acronym):
373373
add_event_info_to_session_qs(Session.objects.filter(group=group, meeting=meeting)).filter(current_status='notmeet').delete()
374374

375375
# send notification
376+
session_data['outbound_conflicts'] = [f"{d['name']}: {d['groups']}" for d in outbound_conflicts]
376377
send_notification(group,meeting,login,session_data,'new')
377378

378379
status_text = 'IETF Agenda to be scheduled'

ietf/secr/templates/includes/session_info.txt

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,11 @@ Number of Sessions: {{ session.num_session }}
99
Length of Session(s): {{ session.length_session1|display_duration }}{% if session.length_session2 %}, {{ session.length_session2|display_duration }}{% endif %}{% if session.length_session3 %}, {{ session.length_session3|display_duration }}{% endif %}
1010
Number of Attendees: {{ session.attendees }}
1111
Conflicts to Avoid:
12-
{% if session.conflict1 %} Chair Conflict: {{ session.conflict1 }}{% endif %}
13-
{% if session.conflict2 %} Technology Overlap: {{ session.conflict2 }}{% endif %}
14-
{% if session.conflict3 %} Key Participant Conflict: {{ session.conflict3 }}{% endif %}
15-
{% if session.session_time_relation_display %} {{ session.session_time_relation_display }}{% endif %}
16-
{% if session.adjacent_with_wg %} Adjacent with WG: {{ session.adjacent_with_wg }}{% endif %}
12+
{% for line in session.outbound_conflicts %} {{line}}
13+
{% endfor %}{% if session.session_time_relation_display %} {{ session.session_time_relation_display }}{% endif %}
14+
{% if session.adjacent_with_wg %} Adjacent with WG: {{ session.adjacent_with_wg }}{% endif %}
1715
{% if session.timeranges_display %} Can't meet: {{ session.timeranges_display|join:", " }}{% endif %}
1816

19-
2017
People who must be present:
2118
{% for person in session.bethere %} {{ person.ascii_name }}
2219
{% endfor %}

0 commit comments

Comments
 (0)