Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 3 commits into from
May 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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