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 {