fix(helpdesk): consolidation fixes from drift/performance/security review
- Fix docblock: getTicketsForTeam() uses PBI_FP_Tickets, not LV - Process_Stage check now uses isset() guard — FP entity does not expose this field, prevents false positives from default 0 - Remove exception message from JSON error response (security) - Remove dead JS functions: formatAge(), formatDate() - Remove debug console.error and verbose error display from JS Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1603,8 +1603,10 @@ class DebitorDetailService
|
||||
|
||||
foreach ($tickets as $ticket) {
|
||||
$state = trim((string) ($ticket['Ticket_State'] ?? ''));
|
||||
// Team query uses PBI_FP_Tickets which has no Process_Stage;
|
||||
// fall back to Process_Stage only when present (LV entity).
|
||||
$isClosed = self::isClosedTicketState($state)
|
||||
|| (int) ($ticket['Process_Stage'] ?? 0) === 40;
|
||||
|| (isset($ticket['Process_Stage']) && (int) $ticket['Process_Stage'] === 40);
|
||||
|
||||
$rawUser = trim((string) ($ticket['Support_User_Name'] ?? ''));
|
||||
$normalizedUser = $rawUser === '' ? '' : strtolower($rawUser);
|
||||
|
||||
Reference in New Issue
Block a user