Include new conflict types in the session request notification email. Fixes #3381. Commit ready for merge.

- Legacy-Id: 19301
This commit is contained in:
Robert Sparks 2021-08-26 21:51:04 +00:00
parent fe5cfbd11d
commit 7db98010e2
3 changed files with 8 additions and 8 deletions

View file

@ -395,6 +395,7 @@ class SubmitRequestCase(TestCase):
group = GroupFactory(acronym='ames', parent=area)
group2 = GroupFactory(acronym='ames2', parent=area)
group3 = GroupFactory(acronym='ames2', parent=area)
group4 = GroupFactory(acronym='ames3', parent=area)
RoleFactory(name_id='chair', group=group, person__user__username='ameschairman')
resource = ResourceAssociation.objects.create(name_id='project')
# Bit of a test data hack - the fixture now has no used resources to pick from
@ -409,7 +410,7 @@ class SubmitRequestCase(TestCase):
'length_session2':'3600',
'attendees':'10',
'bethere':str(ad.pk),
'constraint_chair_conflict':'',
'constraint_chair_conflict':group4.acronym,
'comments':'',
'resources': resource.pk,
'session_time_relation': 'subsequent-days',
@ -450,6 +451,8 @@ class SubmitRequestCase(TestCase):
self.assertTrue("Can't meet: Thursday early afternoon, Thursday late" in notification_payload)
self.assertTrue('Second session joint with: {}'.format(group3.acronym) in notification_payload)
self.assertTrue(ad.ascii_name() in notification_payload)
self.assertIn(ConstraintName.objects.get(slug='chair_confict').name, notification_payload)
self.assertIn(group.acronym, notification_payload)
class LockAppTestCase(TestCase):
def setUp(self):

View file

@ -373,6 +373,8 @@ def confirm(request, acronym):
add_event_info_to_session_qs(Session.objects.filter(group=group, meeting=meeting)).filter(current_status='notmeet').delete()
# send notification
session_data['outbound_conflicts'] = [f"{d['name']}: {d['groups']}" for d in outbound_conflicts]
debug.show('session_data["outbound_conflicts"]')
send_notification(group,meeting,login,session_data,'new')
status_text = 'IETF Agenda to be scheduled'

View file

@ -9,13 +9,8 @@ Number of Sessions: {{ session.num_session }}
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 %}
Number of Attendees: {{ session.attendees }}
Conflicts to Avoid:
{% if session.conflict1 %} Chair Conflict: {{ session.conflict1 }}{% endif %}
{% if session.conflict2 %} Technology Overlap: {{ session.conflict2 }}{% endif %}
{% if session.conflict3 %} Key Participant Conflict: {{ session.conflict3 }}{% endif %}
{% if session.session_time_relation_display %} {{ session.session_time_relation_display }}{% endif %}
{% if session.adjacent_with_wg %} Adjacent with WG: {{ session.adjacent_with_wg }}{% endif %}
{% if session.timeranges_display %} Can't meet: {{ session.timeranges_display|join:", " }}{% endif %}
{% for line in session.outbound_conflicts %}{{line}}
{% endfor %}
People who must be present:
{% for person in session.bethere %} {{ person.ascii_name }}