diff --git a/application/forms/SaveEventRuleForm.php b/application/forms/SaveEventRuleForm.php index 89dc645f..749969a6 100644 --- a/application/forms/SaveEventRuleForm.php +++ b/application/forms/SaveEventRuleForm.php @@ -395,7 +395,7 @@ public function editRule(int $id, array $config): void return; } - $escalationsInCache = $config['rule_escalation']; + $escalationsInCache = $values['rule_escalation']; $escalationsToUpdate = []; $escalationsToRemove = []; @@ -521,13 +521,17 @@ private function fetchDbValues(): array $escalationRecipients = $re ->rule_escalation_recipient - ->withoutColumns(['changed_at', 'deleted']); + ->withoutColumns(['rule_escalation_id', 'changed_at', 'deleted']); foreach ($escalationRecipients as $recipient) { $config[$re->getTableName()][$re->position]['recipient'][] = iterator_to_array($recipient); } } + if (! isset($config['rule_escalation'])) { + $config['rule_escalation'] = []; + } + $config['showSearchbar'] = ! empty($config['object_filter']); return $config;