From 60f23051a90d76f5728808cba9d66b999a590068 Mon Sep 17 00:00:00 2001 From: Jared Vititoe Date: Sat, 11 Apr 2026 13:45:04 -0400 Subject: [PATCH] Fix notifications not detecting comment events AuditLogModel::logCommentCreate logs comments with action_type='comment' not 'create'. The notification query was filtering on action_type='create' only, so comment events on watched/owned tickets were never surfaced. Widen the filter to IN ('comment', 'create') to match the actual logged values while staying compatible with any legacy entries. Co-Authored-By: Claude Sonnet 4.6 --- api/notifications.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/notifications.php b/api/notifications.php index b32a21e..be7b162 100644 --- a/api/notifications.php +++ b/api/notifications.php @@ -92,7 +92,7 @@ $commentSql = "SELECT COALESCE(u.display_name, u.username, 'System') AS actor_name FROM audit_log al LEFT JOIN users u ON al.user_id = u.user_id - WHERE al.action_type = 'create' + WHERE al.action_type IN ('comment', 'create') AND al.entity_type = 'comment' AND al.user_id != ? AND al.created_at >= DATE_SUB(NOW(), INTERVAL 7 DAY)