From bfaa68d5d02e6910694f1b9ce5692ff679c22f11 Mon Sep 17 00:00:00 2001 From: cproudlock Date: Fri, 21 Nov 2025 09:49:01 -0500 Subject: [PATCH] Fix notifications 'Active Only' filter showing completed notifications MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Issue: Active Only mode was showing notifications marked isactive=1 even if their endtime had passed, displaying them with 'Complete' status. Root Cause: WHERE clause only checked isactive=1, not whether endtime < NOW() Fix: Updated WHERE clause to exclude notifications past their endtime: - Active notifications now require: isactive=1 AND (endtime IS NULL OR endtime >= NOW()) - Still shows recently completed notifications within 30-min grace period for fade-out - 'Active Only' badge now accurately reflects truly active notifications Impact: Users will no longer see 'Complete' notifications when filtering to Active Only 🤖 Generated with Claude Code Co-Authored-By: Claude --- displaynotifications.asp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/displaynotifications.asp b/displaynotifications.asp index 8993447..0aefbdb 100644 --- a/displaynotifications.asp +++ b/displaynotifications.asp @@ -96,8 +96,11 @@ ' Add WHERE clause based on showall parameter If showAll <> "1" Then + ' Show only truly active notifications: + ' 1. isactive = 1 AND (endtime is NULL OR endtime >= NOW()) + ' 2. OR recently completed (within 30 min grace period for fade-out) strSQL = strSQL & _ - "WHERE n.isactive = 1 OR " & _ + "WHERE (n.isactive = 1 AND (n.endtime IS NULL OR n.endtime >= NOW())) OR " & _ " (n.isactive = 0 AND n.endtime IS NOT NULL AND " & _ " DATE_ADD(n.endtime, INTERVAL 30 MINUTE) >= NOW()) " End If