From 3dc15f8c13927cd24f3b68ab8d287da648b62576 Mon Sep 17 00:00:00 2001 From: John Mizerek Date: Sat, 31 Jan 2026 21:00:46 -0800 Subject: [PATCH] =?UTF-8?q?Fix=20TaskID=20=E2=86=92=20ID=20in=20WHERE=20cl?= =?UTF-8?q?auses=20on=20Tasks=20table=20(4=20files=20+=20cron=20copy)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - tasks/accept.cfm: WHERE TaskID → WHERE ID - tasks/completeChat.cfm: WHERE TaskID → WHERE ID - tasks/expireStaleChats.cfm: WHERE TaskID → WHERE ID - cron/expireStaleChats.cfm: WHERE TaskID → WHERE ID - chat/closeChat.cfm: WHERE TaskID → WHERE ID Co-Authored-By: Claude Opus 4.5 --- api/chat/closeChat.cfm | 2 +- api/tasks/accept.cfm | 2 +- api/tasks/completeChat.cfm | 2 +- api/tasks/expireStaleChats.cfm | 2 +- cron/expireStaleChats.cfm | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/api/chat/closeChat.cfm b/api/chat/closeChat.cfm index d5012d0..fe15e8a 100644 --- a/api/chat/closeChat.cfm +++ b/api/chat/closeChat.cfm @@ -35,7 +35,7 @@ try { queryExecute(" UPDATE Tasks SET CompletedOn = NOW() - WHERE TaskID = :taskID + WHERE ID = :taskID AND TaskTypeID = 2 AND CompletedOn IS NULL ", { diff --git a/api/tasks/accept.cfm b/api/tasks/accept.cfm index b17d0e9..ea6f9b0 100644 --- a/api/tasks/accept.cfm +++ b/api/tasks/accept.cfm @@ -55,7 +55,7 @@ UPDATE Tasks SET ClaimedByUserID = ?, ClaimedOn = NOW() - WHERE TaskID = ? + WHERE ID = ? AND ClaimedByUserID = 0 ", [ { value = UserID GT 0 ? UserID : 1, cfsqltype = "cf_sql_integer" }, diff --git a/api/tasks/completeChat.cfm b/api/tasks/completeChat.cfm index 7cd9d2a..c113352 100644 --- a/api/tasks/completeChat.cfm +++ b/api/tasks/completeChat.cfm @@ -59,7 +59,7 @@