-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Open
Copy link
Description
When incident tasks are automatically created (from failed test cases) and assigned to users, assignees do not receive email notifications. Manual task creation works correctly.
Root Cause:
- Auto-created tasks use
FeedRepository.create(thread)internally without generating aChangeEvent. - Email notifications rely on persisted
ChangeEvententries, which are missing in this flow. - Similarly, when updating an existing task during Ack → Assigned transitions (
patchTaskAssignee()), noChangeEventis created because the code path is internal and bypasses the REST response interceptor (ChangeEventHandler).
Impact:
- Assignees of auto-created tasks do not receive email notifications.
- Audit trail is incomplete for automated task creation and assignment changes.
Proposed Fix:
- Create a helper method
createAndPersistThreadChangeEvent(Thread thread, String userName, EventType eventType)to explicitly generate and storeTHREAD_CREATEDorTHREAD_UPDATEDevents. - Update
createTask()to call this helper after creating a task. - Update
patchTaskAssignee()to call this helper after updating task assignees. - Ensure REST endpoints continue using
ChangeEventHandlerto avoid duplicates.
Expected Outcome:
- Email notifications sent for all automated task creations and assignment updates.
- Audit trail complete for all incident task operations.
- WebSocket notifications remain functional.
- No duplicate ChangeEvents are generated.
Metadata
Metadata
Assignees
Type
Projects
Status
In Review / QA 👀