Skip to content

#4320 Add attendance data graph types to statistics tab - #4389

Open
RemainingDelta wants to merge 2 commits into
developfrom
4320-attendance-data-in-statistics-tab
Open

#4320 Add attendance data graph types to statistics tab#4389
RemainingDelta wants to merge 2 commits into
developfrom
4320-attendance-data-in-statistics-tab

Conversation

@RemainingDelta

Copy link
Copy Markdown
Contributor

Changes

  • Add ATTENDANCE_BY_TEAM and ATTENDANCE_BY_DIVISION graph types — compute the percentage of a team's roster (members + leads + head) that attended its meetings, aggregated per team or per division with the Sum/Avg toggle
  • Add two new Graph_Type enum values + migration, mirrored in the shared GraphType enum
  • Add getGraphDataForAttendanceByTeam/ByDivision in statistics.utils.ts, wired into the getGraphData/getAxisLabels switches
  • Extract the team-attendance-percent formula (previously copy-pasted in the attendance transformer + service) into a shared attendance.utils.ts used by all call sites
  • Register the new types in graphs.factory.ts (every collection gets one; one showcase collection gets both), and draw meeting attendees from each team's real roster so percentages are meaningful

Notes

  • Attendance graphs ignore the car filter — Meeting_Attendance has no car relation, so carIds is a no-op for these types
  • Only Team and Division dimensions exist (no "by Project") since meetings aren't tied to projects
  • Only closed sessions (closedAt set) within the graph's date range are counted; open sessions are excluded
  • No frontend changes needed — the graph dropdown and chart rendering are already enum-driven

Screenshots

Old Dropdown:
New Grap

New Dropdown:
New Crap

Old Graphs:
Pasted Graphic 8

New Graphs:
Pasted Graphic 9

Closes #4320

@RemainingDelta RemainingDelta changed the title 4320 Add attendance data graph types to statistics tab #4320 Add attendance data graph types to statistics tab Aug 19, 2026
@RemainingDelta
RemainingDelta requested a review from staysgt August 20, 2026 18:35

@staysgt staysgt left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good so far! Left a few comments

Comment thread src/backend/src/utils/statistics.utils.ts
Comment thread src/backend/src/utils/statistics.utils.ts Outdated
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.

[Maintenance] - Attendance Data in the Statistics Tab

2 participants