From c14ff27c378643d682bd8b6dffe36a676c89b9dc Mon Sep 17 00:00:00 2001 From: fs Date: Wed, 22 Apr 2026 10:24:29 +0200 Subject: [PATCH] feat(helpdesk): promote ticket description to its own column in updates list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The ticket description was only visible as a tooltip on the ticket number link — easy to miss and not searchable by eye when scanning the list. Move it to a dedicated "Description" column right after "Ticket". - helpdesk-updates-index.js: new column between Ticket and Ticket status, using the shared `.app-cell-note` class for ellipsis + title fallback on long descriptions. Drop the now-redundant data-tooltip on the ticket link. mapData gets one extra positional entry. - updates/index(default).phtml: add ticketDescription label to pageConfig. i18n key "Description" already exists in both core and helpdesk dictionaries, no new strings required. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../helpdesk/updates/index(default).phtml | 1 + .../web/js/pages/helpdesk-updates-index.js | 21 ++++++++++++++----- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/modules/helpdesk/pages/helpdesk/updates/index(default).phtml b/modules/helpdesk/pages/helpdesk/updates/index(default).phtml index 6412ba4..63ead88 100644 --- a/modules/helpdesk/pages/helpdesk/updates/index(default).phtml +++ b/modules/helpdesk/pages/helpdesk/updates/index(default).phtml @@ -83,6 +83,7 @@ require templatePath('partials/app-list-filters.phtml'); 'csrfToken' => $csrfToken ?? '', 'labels' => [ 'ticketNo' => t('Ticket'), + 'ticketDescription' => t('Description'), 'category' => t('Type'), 'debitor' => t('Customer'), 'domain' => t('Domain'), diff --git a/modules/helpdesk/web/js/pages/helpdesk-updates-index.js b/modules/helpdesk/web/js/pages/helpdesk-updates-index.js index 7ca7ffa..d8796ac 100644 --- a/modules/helpdesk/web/js/pages/helpdesk-updates-index.js +++ b/modules/helpdesk/web/js/pages/helpdesk-updates-index.js @@ -25,11 +25,21 @@ createListPageModule({ formatter: (cell) => { const no = escapeHtml(String(cell?.no || '')); const url = String(cell?.url || '').trim(); - const desc = escapeHtml(String(cell?.description || '')); - const tip = desc ? ` data-tooltip="${desc}" data-tooltip-pos="top"` : ''; if (no === '') return gridjs.html(''); - if (url === '') return gridjs.html(`${no}`); - return gridjs.html(`${no}`); + if (url === '') return gridjs.html(`${no}`); + return gridjs.html(`${no}`); + }, + }, + { + name: labels.ticketDescription || 'Description', + sort: false, + formatter: (cell) => { + const text = String(cell || '').trim(); + if (text === '') { + return gridjs.html(''); + } + const escaped = escapeHtml(text); + return gridjs.html(`${escaped}`); }, }, { @@ -103,7 +113,8 @@ createListPageModule({ mapData: (data) => { const rows = data.rows || data.data || []; return rows.map((row) => [ - { no: row.ticket_no || '', url: row.ticket_url || '', description: row.ticket_description || '' }, + { no: row.ticket_no || '', url: row.ticket_url || '' }, + row.ticket_description || '', { label: row.ticket_state_label || '', variant: row.ticket_state_variant || 'neutral' }, { label: row.status_label || '', variant: row.status_variant || 'neutral' }, {