Skip to content

Commit

Permalink
[SIEM][Detection Engine] Tags being turned into null
Browse files Browse the repository at this point in the history
## Summary

Test:

1.) Add a tag to a new rule
2.) Activate the rule
3.) Ensure the tag does not go away

### Checklist

Use ~~strikethroughs~~ to remove checklist items you don't feel are applicable to this PR.

~~- [ ] This was checked for cross-browser compatibility, [including a check against IE11](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility)~~

~~- [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/master/packages/kbn-i18n/README.md)~~

~~- [ ] [Documentation](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#writing-documentation) was added for features that require explanation or tutorials~~

~~- [ ] [Unit or functional tests](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility) were updated or added to match the most common scenarios~~

~~- [ ] This was checked for [keyboard-only and screenreader accessibility](https://developer.mozilla.org/en-US/docs/Learn/Tools_and_testing/Cross_browser_testing/Accessibility#Accessibility_testing_checklist)~~

### For maintainers

~~- [ ] This was checked for breaking API changes and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)~~

- [x] This includes a feature addition or change that requires a release note and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)
  • Loading branch information
FrankHassanabad committed Jan 22, 2020
1 parent 31e6a3b commit b5c6c9a
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -173,12 +173,11 @@ export const updateRules = async ({
} else {
// enabled is null or undefined and we do not touch the rule
}

return alertsClient.update({
id: rule.id,
data: {
tags: addTags(
tags,
tags != null ? tags : rule.tags, // Add tags as an update if it exists, otherwise re-use the older tags
rule.params.ruleId,
immutable != null ? immutable : rule.params.immutable // Add new one if it exists, otherwise re-use old one
),
Expand Down

0 comments on commit b5c6c9a

Please sign in to comment.