Skip to content

Commit

Permalink
EventRuleConfigForm::getChanges: Take escalation deletion into account
Browse files Browse the repository at this point in the history
  • Loading branch information
sukhwinder33445 committed Jun 7, 2024
1 parent 258191c commit f92b668
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions application/forms/EventRuleConfigForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -656,6 +656,15 @@ public function getChanges(): array
$values = $this->getValues();
$dbValuesToCompare = array_intersect_key($this->config, $values);

if (count($values, COUNT_RECURSIVE) < count($dbValuesToCompare, COUNT_RECURSIVE)) {
if ($values['object_filter'] === $dbValuesToCompare['object_filter']) {
unset($values['object_filter']);
}

// escalation has been removed
return $values;
}

$checker = static function ($a, $b) use (&$checker) {
if (! is_array($a) || ! is_array($b)) {
return $a <=> $b;
Expand Down

0 comments on commit f92b668

Please sign in to comment.