Skip to content

Commit

Permalink
wip: event rule
Browse files Browse the repository at this point in the history
  • Loading branch information
sukhwinder33445 committed Jul 10, 2024
1 parent d7d14b5 commit ed5d34d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions application/forms/SaveEventRuleForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ public function editRule(int $id, array $config): void
return;
}

$escalationsInCache = $config['rule_escalation'];
$escalationsInCache = $values['rule_escalation'];

$escalationsToUpdate = [];
$escalationsToRemove = [];
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit ed5d34d

Please sign in to comment.