From 72d39822bcd9b79e577526ea612a92c65ac9d52d Mon Sep 17 00:00:00 2001 From: fs Date: Sun, 5 Apr 2026 19:36:58 +0200 Subject: [PATCH] fix(helpdesk): revert to PBI_LV_Tickets for team query, add error logging MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PBI_FP_Tickets (FactPage) fails without a customer filter. Switch back to PBI_LV_Tickets which works reliably unfiltered. Description and Company_Contact_Name added to select — BC will return them if available, otherwise they fall back to empty strings via existing null-coalescing. Add console.error in JS catch to surface rendering errors. Co-Authored-By: Claude Opus 4.6 (1M context) --- .../helpdesk/lib/Module/Helpdesk/Service/BcODataGateway.php | 4 ++-- modules/helpdesk/web/js/helpdesk-team.js | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/helpdesk/lib/Module/Helpdesk/Service/BcODataGateway.php b/modules/helpdesk/lib/Module/Helpdesk/Service/BcODataGateway.php index 9d2e9b5..80176eb 100644 --- a/modules/helpdesk/lib/Module/Helpdesk/Service/BcODataGateway.php +++ b/modules/helpdesk/lib/Module/Helpdesk/Service/BcODataGateway.php @@ -597,9 +597,9 @@ class BcODataGateway */ public function getTicketsForTeam(): array { - $url = $this->settingsGateway->buildEntityUrl(self::ENTITY_TICKETS) + $url = $this->settingsGateway->buildEntityUrl(self::ENTITY_TICKETS_LV) . '?$top=500' - . '&$select=' . rawurlencode('No,Description,Company_Contact_Name,Customer_No,Ticket_State,Support_User_Name,Created_On,Last_Activity_Date') + . '&$select=' . rawurlencode('No,Customer_No,Category_1_Code,Escalation_Code,Ticket_State,Last_Activity_Date,Created_On,Process_Stage,Process_Code,Support_User_Name,Description,Company_Contact_Name') . '&$orderby=' . rawurlencode('Created_On desc'); $response = $this->request('GET', $url); diff --git a/modules/helpdesk/web/js/helpdesk-team.js b/modules/helpdesk/web/js/helpdesk-team.js index 8da27e9..6c9ed3c 100644 --- a/modules/helpdesk/web/js/helpdesk-team.js +++ b/modules/helpdesk/web/js/helpdesk-team.js @@ -212,7 +212,8 @@ if (container) { renderCurrentTab(json.members); renderPerformanceTab(json.members); showState('success'); - } catch { + } catch (err) { + console.error('[helpdesk-team]', err); showState('error'); } }