Populate the alert rule field with the builder json (#14374)

That way it isn't empty. (which is unexpected)
This commit is contained in:
Tony Murray
2022-10-02 00:02:08 -05:00
committed by GitHub
parent abe4f6fbc0
commit 964a67289a

View File

@@ -188,7 +188,7 @@ class RunAlerts
$obj['uid'] = $alert['id'];
$obj['alert_id'] = $alert['alert_id'];
$obj['severity'] = $alert['severity'];
$obj['rule'] = $alert['rule'];
$obj['rule'] = $alert['rule'] ?: json_encode($alert['builder']);
$obj['name'] = $alert['name'];
$obj['timestamp'] = $alert['time_logged'];
$obj['contacts'] = $extra['contacts'];