From 33227ee1c4993236c10a66c149b1ecdc152e1d1f Mon Sep 17 00:00:00 2001 From: suifri Date: Thu, 12 Nov 2026 15:34:59 +0200 Subject: [PATCH] [WTEL-10998]fix(cc_queue_store): use column aliases - add agent alises to statuses select for QueueReportGeneral --- store/sqlstore/cc_queue_store.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/store/sqlstore/cc_queue_store.go b/store/sqlstore/cc_queue_store.go index bea801a1..ade420b8 100644 --- a/store/sqlstore/cc_queue_store.go +++ b/store/sqlstore/cc_queue_store.go @@ -583,13 +583,13 @@ with queues as ( select distinct q.id queue_id, array_agg(distinct a.id) filter ( - where status = 'online' + where a.status = 'online' and (a.status_id is null or sp.is_system is true or spp.skill_id is not null) ) agent_on_ids, - array_agg(distinct a.id) filter ( where status = 'offline' ) agent_off_ids, - array_agg(distinct a.id) filter ( where status in ('pause', 'break_out') ) agent_p_ids, + array_agg(distinct a.id) filter ( where a.status = 'offline' ) agent_off_ids, + array_agg(distinct a.id) filter ( where a.status in ('pause', 'break_out') ) agent_p_ids, array_agg(distinct a.id) filter ( - where status = 'online' + where a.status = 'online' and (a.status_id is null or sp.is_system is true or spp.skill_id is not null) and ac.state = 'waiting' ) free,