Skip to content

Commit f92b668

Browse files
EventRuleConfigForm::getChanges: Take escalation deletion into account
1 parent 258191c commit f92b668

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

application/forms/EventRuleConfigForm.php

+9
Original file line numberDiff line numberDiff line change
@@ -656,6 +656,15 @@ public function getChanges(): array
656656
$values = $this->getValues();
657657
$dbValuesToCompare = array_intersect_key($this->config, $values);
658658

659+
if (count($values, COUNT_RECURSIVE) < count($dbValuesToCompare, COUNT_RECURSIVE)) {
660+
if ($values['object_filter'] === $dbValuesToCompare['object_filter']) {
661+
unset($values['object_filter']);
662+
}
663+
664+
// escalation has been removed
665+
return $values;
666+
}
667+
659668
$checker = static function ($a, $b) use (&$checker) {
660669
if (! is_array($a) || ! is_array($b)) {
661670
return $a <=> $b;

0 commit comments

Comments
 (0)