Skip to content

Commit

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

## Summary

Original ticket: elastic#156472

These changes adds `{{state.signals_count}}` object to be available in
message body for the `"For each alert"` option.
  • Loading branch information
e40pud authored May 5, 2023
1 parent 29fe83f commit 99e5e38
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 99e5e38

Please sign in to comment.