KamoCRM

Per-member overdue rollup for the compliance matrix

Featurekamo-shared-library
Shipped
12 ஆகஸ்ட், 2026 அன்று 5:43 PM UTC
Author
Kamo
Commit
a7ce4b2

The HR Overview's matrix branches on `row.overdue > 0`, but the legal and training rollups shipped with that field hardcoded to 0 — a branch that could never be taken, so those two domains could only ever show amber or green and "sorted worst-first" degenerated. The (member, status) histogram cannot answer it: it carries no dueAt. So each repository gains a grouped count whose predicate is character-for-character the one in countOverdueForOrg, plus GROUP BY teamMemberId. Sharing the predicate is what makes the per-member figures sum to the org-level count rendered above them. Query methods only. No entity change, no DDL, version stays 1.5.0. Callers keep owning the open set, and the two are NOT the same: legal passes OPEN_STATES, training passes REMINDABLE_STATES. AWAITING_GRADING is open but owes the member nothing, and counting it overdue would reproduce the legal module's AWAITING_OTHERS bug that told on-time members they were weeks late, forever.

All changes

Like what you see shipping?

All of it arrives in your workspace on its own. Start on the free plan and read this page again in a month.

Start Free ForeverView Pricing