Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: display session lengths and conflicts in sess scheduled emails #7887

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

microamp
Copy link
Contributor

@microamp microamp commented Sep 2, 2024

fixes #7874

In draft currently to get some feedback. Also, to discuss how to write unit tests for email content in general.


The session_info.txt inner template is being loaded in multiple templates.

ietf/secr/templates/meetings/session_schedule_notification.txt
19:{% include "includes/session_info.txt" %}{% endtimezone %}

ietf/secr/templates/sreq/session_approval_notification.txt
15:{% include "includes/session_info.txt" %}

ietf/secr/templates/sreq/session_request_notification.txt
5:{% include "includes/session_info.txt" %}

The following keys were missing for session schedule emails:

  • session_lengths

  • session.outbound_conflicts (nested)

With the change, the context dictionary looks like the following.

{'agenda_note': '',
 'baseurl': 'https://datatracker.ietf.org',
 'group': <Group: Measurement and Analysis for Protocols>,
 'items': [{'duration': '2:00',
            'period': '0930-1130 America/Vancouver',
            'session': <Session: IETF-120: maprg  Wed-1630>,
            'timeslot': <TimeSlot: 120: 07-24 16:30-18:30 Session I, Georgia B>}],
 'login': <Person: Mirja Kühlewind>,
 'meeting': <Meeting: IETF-120>,
 'session': {'adjacent_with_wg': None,
             'attendees': 100,
             'bethere': [],
             'comments': 'Please also deconflict the sconepro BoF',
             'constraint_chair_conflict': 'tcpm iabopen quic taps masque '
                                          'privacypass webtrans moq mimi',
             'constraint_tech_overlap': 'v6ops tsvwg tls secdispatch saag '
                                        'rtgarea panrg opsawg irtfopen intarea '
                                        'iccrg httpbis dnsop dispatch bmwg '
                                        'artarea 6man gendispatch iotops ippm '
                                        'ppm openpgp pearg',
             'num_session': 1,
             'outbound_conflicts': ['Chair conflict: tcpm iabopen quic taps '
                                    'masque privacypass webtrans moq mimi',
                                    'Technology overlap: v6ops tsvwg tls '
                                    'secdispatch saag rtgarea panrg opsawg '
                                    'irtfopen intarea iccrg httpbis dnsop '
                                    'dispatch bmwg artarea 6man gendispatch '
                                    'iotops ippm ppm openpgp pearg'],  # added
             'resources': <QuerySet []>,
             'session_time_relation': None,
             'session_time_relation_display': None,
             'third_session': False,
             'timeranges': [],
             'timeranges_display': []},
 'session_lengths': [datetime.timedelta(seconds=7200)],  # added
 'to_name': 'Mirja Kühlewind'}

Copy link

codecov bot commented Sep 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.78%. Comparing base (c7f6bde) to head (75a539e).
Report is 53 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7887      +/-   ##
==========================================
- Coverage   88.78%   88.78%   -0.01%     
==========================================
  Files         296      304       +8     
  Lines       41320    41452     +132     
==========================================
+ Hits        36687    36802     +115     
- Misses       4633     4650      +17     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Conflicts to Avoid:" field in the "Requested session has been scheduled for ..." email is empty
1 participant