From b82111c65bbb00b274f62614092bfb689392fb5d Mon Sep 17 00:00:00 2001 From: tnegre Date: Wed, 27 Nov 2024 15:00:27 +0100 Subject: [PATCH] FIX select on ticket list for fields group and severity (issue #31619) --- htdocs/core/class/html.formticket.class.php | 14 +++++++++----- htdocs/langs/en_US/ticket.lang | 2 ++ 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/htdocs/core/class/html.formticket.class.php b/htdocs/core/class/html.formticket.class.php index 2838c10b7419f..88ef66a06d856 100644 --- a/htdocs/core/class/html.formticket.class.php +++ b/htdocs/core/class/html.formticket.class.php @@ -391,12 +391,12 @@ function(response) { if ($public) { $filter = '(public:=:1)'; } - $this->selectGroupTickets($category_code, 'category_code', $filter, 2, 1, 0, 0, 'minwidth200 maxwidth500'); + $this->selectGroupTickets($category_code, 'category_code', $filter, 2, 0, 0, 0, 'minwidth200 maxwidth500'); print ''; // Severity => Priority print ''; - $this->selectSeveritiesTickets($severity_code, 'severity_code', '', 2, 1, 0, 0, 'minwidth200 maxwidth500'); + $this->selectSeveritiesTickets($severity_code, 'severity_code', '', 2, 0, 0, 0, 'minwidth200 maxwidth500'); print ''; if (isModEnabled('knowledgemanagement')) { @@ -885,6 +885,8 @@ public function selectGroupTickets($selected = '', $htmlname = 'ticketcategory', print ''; if ($empty) { print ''; + } else { + print ''; } if (is_array($conf->cache['severity_tickets']) && count($conf->cache['severity_tickets'])) { @@ -1273,7 +1277,7 @@ public function selectSeveritiesTickets($selected = '', $htmlname = 'ticketsever print ' selected="selected"'; } elseif (isset($selected) && $selected == $id) { print ' selected="selected"'; - } elseif ($arrayseverities['use_default'] == "1" && empty($selected)) { + } elseif ($arrayseverities['use_default'] == "1" && empty($selected) && !$empty) { print ' selected="selected"'; } diff --git a/htdocs/langs/en_US/ticket.lang b/htdocs/langs/en_US/ticket.lang index bb0cd645857cc..752d88e02389e 100644 --- a/htdocs/langs/en_US/ticket.lang +++ b/htdocs/langs/en_US/ticket.lang @@ -152,6 +152,8 @@ ShowAsConversation=Show as conversation list MessageListViewType=Show as table list ConfirmMassTicketClosingSendEmail=Automatically send emails when closing tickets ConfirmMassTicketClosingSendEmailQuestion=Do you want to notify thirdparties when closing these tickets ? +TicketSelectGroup=Select group +TicketSelectSeverity=Select severity # Ticket card Ticket=Ticket TicketCard=Ticket card