Merged in [19301] [19303] [19304] from rjsparks@nostrum.com:

Include new conflict types in the session request notification email. Fixes #3381.
 - Legacy-Id: 19324
Note: SVN reference [19301] has been migrated to Git commit 7db98010e2

Note: SVN reference [19303] has been migrated to Git commit 5f465caa18

Note: SVN reference [19304] has been migrated to Git commit 05390ebb7a
This commit is contained in:
Robert Sparks 2021-09-03 18:06:47 +00:00
commit 93fe2e5ac0
3 changed files with 8 additions and 7 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_conflict').name, notification_payload)
self.assertIn(group.acronym, notification_payload)
class LockAppTestCase(TestCase):
def setUp(self):

View file

@ -373,6 +373,7 @@ 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]
send_notification(group,meeting,login,session_data,'new')
status_text = 'IETF Agenda to be scheduled'

View file

@ -9,14 +9,11 @@ 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 %}
{% for line in session.outbound_conflicts %} {{line}}
{% endfor %}{% 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 %}
People who must be present:
{% for person in session.bethere %} {{ person.ascii_name }}
{% endfor %}