Skip to content

Commit d1b418d

Browse files
committed
EventRuleConfigForm: Consider escalation deletion while checking for changes
1 parent 3254f5c commit d1b418d

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
@@ -657,6 +657,15 @@ public function getChanges(): array
657657
$values = $this->getValues();
658658
$dbValuesToCompare = array_intersect_key($this->config, $values);
659659

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

0 commit comments

Comments
 (0)