From 2229db4a70c6161813dde0c2e19df77258def7d5 Mon Sep 17 00:00:00 2001 From: cproudlock Date: Mon, 13 Jul 2026 13:32:39 -0400 Subject: [PATCH] Notifications: summarize multi-person names in the calendar event title A recognition/training notification for many people prefixed the calendar title with the entire roster ("Name1, Name2, ... , Name20: description"), burying the description. to_calendar_event now shows "First Person +N" when more than one person is listed; single-person titles are unchanged and the detail popup still shows the full employeename. Fixes the cluttered month grid, especially after the loader began resolving employee SSOs to names. 31 notification/calendar tests pass; naming green. Co-Authored-By: Claude Opus 4.8 --- plugins/notifications/models/notification.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/plugins/notifications/models/notification.py b/plugins/notifications/models/notification.py index a49832d..42616b7 100644 --- a/plugins/notifications/models/notification.py +++ b/plugins/notifications/models/notification.py @@ -159,11 +159,17 @@ class Notification(db.Model): color = color_aliases.get(raw_color, raw_color if raw_color.startswith('#') else '#14abef') show_photo = bool(ntype and getattr(ntype, 'showemployeephoto', False)) - # Employee-photo types prefix the card with the person's name/SSO. + # Employee-photo types prefix the card with the person's name/SSO. A + # multi-person recognition/training lists many people, so summarize as + # "First Person +N" to keep the calendar title short (the detail popup + # still shows the full employeename). title = self.title if show_photo: employee_display = self.employeename or self.employeesso if employee_display: + people = [p.strip() for p in employee_display.split(',') if p.strip()] + if len(people) > 1: + employee_display = f"{people[0]} +{len(people) - 1}" title = f"{employee_display}: {title}" return {