Skip to content

Commit

Permalink
[Security Solution] {{state.signals_count}} Object not working (#156472
Browse files Browse the repository at this point in the history
…) (#156707)

## Summary

Original ticket: #156472

These changes adds `{{state.signals_count}}` object to be available in
message body for the `"For each alert"` option.

(cherry picked from commit 99e5e38)
  • Loading branch information
e40pud committed May 5, 2023
1 parent 0d6161a commit 30432a9
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,9 @@ export const createPersistenceRuleTypeWrapper: CreatePersistenceRuleTypeWrapper
createdAlerts.forEach((alert) =>
options.services.alertFactory
.create(alert._id)
.replaceState({
signals_count: 1,
})
.scheduleActions(type.defaultActionGroupId, {
rule: mapKeys(snakeCase, {
...options.params,
Expand Down Expand Up @@ -380,6 +383,9 @@ export const createPersistenceRuleTypeWrapper: CreatePersistenceRuleTypeWrapper
createdAlerts.forEach((alert) =>
options.services.alertFactory
.create(alert._id)
.replaceState({
signals_count: 1,
})
.scheduleActions(type.defaultActionGroupId, {
rule: mapKeys(snakeCase, {
...options.params,
Expand Down

0 comments on commit 30432a9

Please sign in to comment.