Skip to content

Commit

Permalink
Fix unsended notifications while 'Delete old groups when adding a new…
Browse files Browse the repository at this point in the history
… one' is set to 'No' (#187)

* Fix unsended notifications while 'Delete old groups when adding a new one' is set to 'No'

* Update CHANGELOG.md
  • Loading branch information
RomainLvr authored May 6, 2024
1 parent 3663936 commit e972aa1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
14 changes: 6 additions & 8 deletions inc/ticket.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit e972aa1

Please # to comment.