From 20d35ab27fb42af73cc8ae6e1832a35985724a76 Mon Sep 17 00:00:00 2001 From: Stanislas Date: Thu, 4 Jul 2024 08:47:46 +0200 Subject: [PATCH] Fix(Option): fix 'use technician group' option --- CHANGELOG.md | 6 ++++++ inc/ticket.class.php | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3faa517..1effe76 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +## [unrelease] - + +### Fixed + +- Fix ```use technician group``` option + ## [2.9.6] - 2024-05-17 ### Fixed diff --git a/inc/ticket.class.php b/inc/ticket.class.php index 5f93b9e..07d44a8 100644 --- a/inc/ticket.class.php +++ b/inc/ticket.class.php @@ -450,14 +450,14 @@ public static function assignUserGroup(Ticket $ticket) isset($ticket->input['_users_id_assign']) && $ticket->input['_users_id_assign'] > 0 && (!isset($ticket->input['_groups_id_assign']) - || $ticket->input['_groups_id_assign'] <= 0) + || empty($ticket->input['_groups_id_assign'])) ) { if ($_SESSION['plugins']['escalade']['config']['use_assign_user_group'] == 1) { // First group $ticket->input['_groups_id_assign'] = PluginEscaladeUser::getTechnicianGroup( $ticket->input['entities_id'], - $ticket->input['_users_id_assign'], + current($ticket->input['_users_id_assign']), true ); //prevent adding empty group