fix(task): address the assignment notifications of a new task to the assignees
Merged
CE
7d ago+80+80+01234567890123456789-2-2-0123456789
Problem
When a task is created with assignees, TaskCreateHandler publishes an ASSIGNMENT notification per assignee without receiverEmployeeId / sentByEmployeeId: it was addressed to no one, so no assignee ever saw it. The update path (TaskService.subscribeNewMembers) sets both.
Fix
Pass receiverEmployeeId: employee.id and sentByEmployeeId: user?.employeeId, as the update path does.
Tests
New task-create.handler.assignment.spec.ts: each notification is addressed to its assignee and sent by the creator, with the right type, entity, organization and tenant.
Notes
Not built or run locally.
Summary by cubic
Fixes assignment notifications for newly created tasks so they reach the assignees instead of being sent with no recipient.
- Passes
receiverEmployeeIdandsentByEmployeeIdwhen publishing ASSIGNMENT notifications on task creation, matching the existing update path inTaskService.subscribeNewMembers. - Reads the creator's name null-safely so a notification without a sender user no longer throws.
- Adds a spec verifying each notification is addressed to its assignee, sent by the creator, with the correct type, entity, organization, and tenant.