From 485145729c20ec04a00b9835eec397febbf0e687 Mon Sep 17 00:00:00 2001 From: Russ Housley Date: Sat, 20 Jul 2024 21:21:55 -0400 Subject: [PATCH] Fix #7706 When generating IETF meeting proceedings, use the Area Acronym for each WG at the time of the meeting. Fixes #7706. --- ietf/meeting/views.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/ietf/meeting/views.py b/ietf/meeting/views.py index 2948a2e715..03c6a33ac8 100644 --- a/ietf/meeting/views.py +++ b/ietf/meeting/views.py @@ -4130,6 +4130,13 @@ def _format_materials(items): def proceedings(request, num=None): + def area_and_group_acronyms_from_session(s): + area = s.group_parent_at_the_time() + if area == None: + area = s.group.parent + group = s.group_at_the_time() + return (area.acronym, group.acronym) + meeting = get_meeting(num) # Early proceedings were hosted on www.ietf.org rather than the datatracker @@ -4180,12 +4187,11 @@ def proceedings(request, num=None): .exclude(current_status='notmeet') ) - ietf = sessions.filter(group__parent__type__slug = 'area').exclude(group__acronym='edu').order_by('group__parent__acronym', 'group__acronym') + ietf = sessions.filter(group__parent__type__slug = 'area').exclude(group__acronym__in=['edu','iepg','tools']) + ietf = list(ietf) + ietf.sort(key=lambda s: area_and_group_acronyms_from_session(s)) ietf_areas = [] - for area, area_sessions in itertools.groupby( - ietf, - key=lambda s: s.group.parent - ): + for area, area_sessions in itertools.groupby(ietf, key=lambda s: s.group_parent_at_the_time()): meeting_groups, not_meeting_groups = organize_proceedings_sessions(area_sessions) ietf_areas.append((area, meeting_groups, not_meeting_groups))