diff --git a/CHANGELOG.md b/CHANGELOG.md index 3c71a63..f75138e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,11 +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/). -## [unreleased] - +## [unreleased] ### Fixed - Fix unauthorized deletion of ticket actors according to plugin configuration +- Fix unsended notifications while `Delete old groups when adding a new one` is set to `No` ## [2.9.4] - 2024-04-03 diff --git a/inc/ticket.class.php b/inc/ticket.class.php index 814ff34..3c253d1 100644 --- a/inc/ticket.class.php +++ b/inc/ticket.class.php @@ -410,17 +410,15 @@ public static function addHistoryOnAddGroup(CommonDBTM $item) public static function processAfterAddGroup(CommonDBTM $item) { - if ($_SESSION['plugins']['escalade']['config']['remove_group'] == false) { - return true; - } - $tickets_id = $item->fields['tickets_id']; - $groups_id = $item->fields['groups_id']; + $groups_id = $item->fields['groups_id']; - //remove old groups (keep last assigned) - self::removeAssignGroups($tickets_id, $groups_id); + //remove old groups (keep last assigned) + if ($_SESSION['plugins']['escalade']['config']['remove_group'] == true) { + self::removeAssignGroups($tickets_id, $groups_id); + } - //notified only the last group assigned + //notified only the last group assigned $ticket = new Ticket(); $ticket->getFromDB($tickets_id);