- Shipped
- August 26, 2026 at 3:13 AM UTC
- Author
- Kamo
- Commit
- 1cd8ac7
Reading a lead's communications is gated on who it is assigned to. A rollup that returned uids alone could not apply that gate, so the account timeline built on it handed every lead's messages to anyone who could open the account — including the leads the lead page itself refuses them. The projection now carries the assignee so the gate has something to decide on. The join to the assignee is explicitly LEFT, and there is a test that keeps it that way. Written as l.assignedTeamMember.id it reads better, Hibernate emits an INNER join, and every UNASSIGNED lead silently disappears from the rollup — no error, just an account missing the leads nobody has picked up yet, which is the set most likely to be sitting on unanswered messages. Unassigned is also a meaningful case downstream: the gate treats it differently from "somebody else's", so losing those rows changes who is refused, not only what is shown. CommsRollupQueryTest parses the queries against the real mapping — an unmapped path fails at BEAN CREATION, so the symptom is SecurityService not starting — and checks the projection aliases match the accessors, which fails the same way.