Skip to content

[RAM] Fix bug where select all rules bypasses filters#176962

Merged
Zacqary merged 3 commits intoelastic:mainfrom
Zacqary:176867-filter-select-fix
Feb 15, 2024
Merged

[RAM] Fix bug where select all rules bypasses filters#176962
Zacqary merged 3 commits intoelastic:mainfrom
Zacqary:176867-filter-select-fix

Conversation

@Zacqary
Copy link
Contributor

@Zacqary Zacqary commented Feb 14, 2024

Summary

Fixes #176867

A bug introduced in #174954 bypassed most filters when using Select All on the Rules List. This was because the names of the filter properties changed, and no longer matched what the useBulkEditSelect hook was expecting.

Because all of these types were optional, it didn't trigger any type errors.

This syncs up the type definitions with the new filter store hook, and adds a functional test to make sure filters are working on bulk actions when clicking the select all button.

Checklist

@Zacqary Zacqary added release_note:fix Team:ResponseOps Platform ResponseOps team (formerly the Cases and Alerting teams) t// Feature:Alerting/RulesManagement Issues related to the Rules Management UX v8.13.0 v8.12.2 labels Feb 14, 2024
@ghost
Copy link

ghost commented Feb 14, 2024

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • /oblt-deploy : Deploy a Kibana instance using the Observability test environments.
  • /oblt-deploy-serverless : Deploy a serverless Kibana instance using the Observability test environments.
  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@Zacqary Zacqary marked this pull request as ready for review February 14, 2024 23:44
@Zacqary Zacqary requested a review from a team as a code owner February 14, 2024 23:44
@elasticmachine
Copy link
Contributor

Pinging @elastic/response-ops (Team:ResponseOps)

@Zacqary Zacqary requested review from JiaweiWu and umbopepato and removed request for JiaweiWu and umbopepato February 14, 2024 23:48
Copy link
Contributor

@JiaweiWu JiaweiWu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested it and seems to work as intended, LGTM!

@Zacqary Zacqary enabled auto-merge (squash) February 15, 2024 17:19
@Zacqary
Copy link
Contributor Author

Zacqary commented Feb 15, 2024

@elasticmachine merge upstream

@kibana-ci
Copy link

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
triggersActionsUi 1.6MB 1.6MB -13.0B

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @umbopepato @JiaweiWu

@Zacqary Zacqary merged commit e136a93 into elastic:main Feb 15, 2024
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Feb 15, 2024
## Summary

Fixes elastic#176867

A bug introduced in elastic#174954
bypassed most filters when using Select All on the Rules List. This was
because the names of the filter properties changed, and no longer
matched what the `useBulkEditSelect` hook was expecting.

Because all of these types were optional, it didn't trigger any type
errors.

This syncs up the type definitions with the new filter store hook, and
adds a functional test to make sure filters are working on bulk actions
when clicking the select all button.

### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

(cherry picked from commit e136a93)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Feb 15, 2024
## Summary

Fixes elastic#176867

A bug introduced in elastic#174954
bypassed most filters when using Select All on the Rules List. This was
because the names of the filter properties changed, and no longer
matched what the `useBulkEditSelect` hook was expecting.

Because all of these types were optional, it didn't trigger any type
errors.

This syncs up the type definitions with the new filter store hook, and
adds a functional test to make sure filters are working on bulk actions
when clicking the select all button.

### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

(cherry picked from commit e136a93)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.12
8.13

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Feb 15, 2024
#177063)

# Backport

This will backport the following commits from `main` to `8.13`:
- [[RAM] Fix bug where select all rules bypasses filters
(#176962)](#176962)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Zacqary Adam
Xeper","email":"Zacqary@users.noreply.github.com"},"sourceCommit":{"committedDate":"2024-02-15T18:30:08Z","message":"[RAM]
Fix bug where select all rules bypasses filters (#176962)\n\n##
Summary\r\n\r\nFixes #176867 \r\n\r\nA bug introduced in
https://github.com/elastic/kibana/pull/174954\r\nbypassed most filters
when using Select All on the Rules List. This was\r\nbecause the names
of the filter properties changed, and no longer\r\nmatched what the
`useBulkEditSelect` hook was expecting.\r\n\r\nBecause all of these
types were optional, it didn't trigger any type\r\nerrors.\r\n\r\nThis
syncs up the type definitions with the new filter store hook,
and\r\nadds a functional test to make sure filters are working on bulk
actions\r\nwhen clicking the select all button.\r\n\r\n###
Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"e136a9318215d5913a5e957aec5d9ad0b8132506","branchLabelMapping":{"^v8.14.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:ResponseOps","Feature:Alerting/RulesManagement","v8.13.0","v8.12.2","v8.14.0"],"title":"[RAM]
Fix bug where select all rules bypasses
filters","number":176962,"url":"https://github.com/elastic/kibana/pull/176962","mergeCommit":{"message":"[RAM]
Fix bug where select all rules bypasses filters (#176962)\n\n##
Summary\r\n\r\nFixes #176867 \r\n\r\nA bug introduced in
https://github.com/elastic/kibana/pull/174954\r\nbypassed most filters
when using Select All on the Rules List. This was\r\nbecause the names
of the filter properties changed, and no longer\r\nmatched what the
`useBulkEditSelect` hook was expecting.\r\n\r\nBecause all of these
types were optional, it didn't trigger any type\r\nerrors.\r\n\r\nThis
syncs up the type definitions with the new filter store hook,
and\r\nadds a functional test to make sure filters are working on bulk
actions\r\nwhen clicking the select all button.\r\n\r\n###
Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"e136a9318215d5913a5e957aec5d9ad0b8132506"}},"sourceBranch":"main","suggestedTargetBranches":["8.13","8.12"],"targetPullRequestStates":[{"branch":"8.13","label":"v8.13.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.12","label":"v8.12.2","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.14.0","branchLabelMappingKey":"^v8.14.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/176962","number":176962,"mergeCommit":{"message":"[RAM]
Fix bug where select all rules bypasses filters (#176962)\n\n##
Summary\r\n\r\nFixes #176867 \r\n\r\nA bug introduced in
https://github.com/elastic/kibana/pull/174954\r\nbypassed most filters
when using Select All on the Rules List. This was\r\nbecause the names
of the filter properties changed, and no longer\r\nmatched what the
`useBulkEditSelect` hook was expecting.\r\n\r\nBecause all of these
types were optional, it didn't trigger any type\r\nerrors.\r\n\r\nThis
syncs up the type definitions with the new filter store hook,
and\r\nadds a functional test to make sure filters are working on bulk
actions\r\nwhen clicking the select all button.\r\n\r\n###
Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"e136a9318215d5913a5e957aec5d9ad0b8132506"}}]}]
BACKPORT-->

Co-authored-by: Zacqary Adam Xeper <Zacqary@users.noreply.github.com>
@Zacqary
Copy link
Contributor Author

Zacqary commented Feb 15, 2024

💚 All backports created successfully

Status Branch Result
8.12

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

Zacqary added a commit to Zacqary/kibana that referenced this pull request Feb 15, 2024
## Summary

Fixes elastic#176867

A bug introduced in elastic#174954
bypassed most filters when using Select All on the Rules List. This was
because the names of the filter properties changed, and no longer
matched what the `useBulkEditSelect` hook was expecting.

Because all of these types were optional, it didn't trigger any type
errors.

This syncs up the type definitions with the new filter store hook, and
adds a functional test to make sure filters are working on bulk actions
when clicking the select all button.

### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

(cherry picked from commit e136a93)
@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label Feb 16, 2024
@kibanamachine
Copy link
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.

fkanout pushed a commit to fkanout/kibana that referenced this pull request Mar 4, 2024
## Summary

Fixes elastic#176867 

A bug introduced in elastic#174954
bypassed most filters when using Select All on the Rules List. This was
because the names of the filter properties changed, and no longer
matched what the `useBulkEditSelect` hook was expecting.

Because all of these types were optional, it didn't trigger any type
errors.

This syncs up the type definitions with the new filter store hook, and
adds a functional test to make sure filters are working on bulk actions
when clicking the select all button.

### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
Zacqary added a commit that referenced this pull request Mar 18, 2024
#177096)

# Backport

This will backport the following commits from `main` to `8.12`:
- [[RAM] Fix bug where select all rules bypasses filters
(#176962)](#176962)

<!--- Backport version: 8.9.8 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Zacqary Adam
Xeper","email":"Zacqary@users.noreply.github.com"},"sourceCommit":{"committedDate":"2024-02-15T18:30:08Z","message":"[RAM]
Fix bug where select all rules bypasses filters (#176962)\n\n##
Summary\r\n\r\nFixes #176867 \r\n\r\nA bug introduced in
https://github.com/elastic/kibana/pull/174954\r\nbypassed most filters
when using Select All on the Rules List. This was\r\nbecause the names
of the filter properties changed, and no longer\r\nmatched what the
`useBulkEditSelect` hook was expecting.\r\n\r\nBecause all of these
types were optional, it didn't trigger any type\r\nerrors.\r\n\r\nThis
syncs up the type definitions with the new filter store hook,
and\r\nadds a functional test to make sure filters are working on bulk
actions\r\nwhen clicking the select all button.\r\n\r\n###
Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"e136a9318215d5913a5e957aec5d9ad0b8132506","branchLabelMapping":{"^v8.14.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:ResponseOps","Feature:Alerting/RulesManagement","v8.13.0","v8.12.2","v8.14.0"],"number":176962,"url":"https://github.com/elastic/kibana/pull/176962","mergeCommit":{"message":"[RAM]
Fix bug where select all rules bypasses filters (#176962)\n\n##
Summary\r\n\r\nFixes #176867 \r\n\r\nA bug introduced in
https://github.com/elastic/kibana/pull/174954\r\nbypassed most filters
when using Select All on the Rules List. This was\r\nbecause the names
of the filter properties changed, and no longer\r\nmatched what the
`useBulkEditSelect` hook was expecting.\r\n\r\nBecause all of these
types were optional, it didn't trigger any type\r\nerrors.\r\n\r\nThis
syncs up the type definitions with the new filter store hook,
and\r\nadds a functional test to make sure filters are working on bulk
actions\r\nwhen clicking the select all button.\r\n\r\n###
Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"e136a9318215d5913a5e957aec5d9ad0b8132506"}},"sourceBranch":"main","suggestedTargetBranches":["8.12"],"targetPullRequestStates":[{"branch":"8.13","label":"v8.13.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/177063","number":177063,"state":"MERGED","mergeCommit":{"sha":"4e45baaef0134a39c624b0bf770eb7b51a7725c9","message":"[8.13]
[RAM] Fix bug where select all rules bypasses filters (#176962)
(#177063)\n\n# Backport\n\nThis will backport the following commits from
`main` to `8.13`:\n- [[RAM] Fix bug where select all rules bypasses
filters\n(#176962)](https://github.com/elastic/kibana/pull/176962)\n\n<!---
Backport version: 9.4.3 -->\n\n### Questions ?\nPlease refer to the
[Backport
tool\ndocumentation](https://github.com/sqren/backport)\n\n<!--BACKPORT
[{\"author\":{\"name\":\"Zacqary
Adam\nXeper\",\"email\":\"Zacqary@users.noreply.github.com\"},\"sourceCommit\":{\"committedDate\":\"2024-02-15T18:30:08Z\",\"message\":\"[RAM]\nFix
bug where select all rules bypasses filters
(#176962)\\n\\n##\nSummary\\r\\n\\r\\nFixes #176867 \\r\\n\\r\\nA bug
introduced
in\nhttps://github.com//pull/174954\\r\\nbypassed most
filters\nwhen using Select All on the Rules List. This was\\r\\nbecause
the names\nof the filter properties changed, and no longer\\r\\nmatched
what the\n`useBulkEditSelect` hook was expecting.\\r\\n\\r\\nBecause all
of these\ntypes were optional, it didn't trigger any
type\\r\\nerrors.\\r\\n\\r\\nThis\nsyncs up the type definitions with
the new filter store hook,\nand\\r\\nadds a functional test to make sure
filters are working on bulk\nactions\\r\\nwhen clicking the select all
button.\\r\\n\\r\\n###\nChecklist\\r\\n\\r\\n- [x] [Unit
or\nfunctional\\r\\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\\r\\nwere\nupdated
or added to match the most
common\nscenarios\",\"sha\":\"e136a9318215d5913a5e957aec5d9ad0b8132506\",\"branchLabelMapping\":{\"^v8.14.0$\":\"main\",\"^v(\\\\d+).(\\\\d+).\\\\d+$\":\"$1.$2\"}},\"sourcePullRequest\":{\"labels\":[\"release_note:fix\",\"Team:ResponseOps\",\"Feature:Alerting/RulesManagement\",\"v8.13.0\",\"v8.12.2\",\"v8.14.0\"],\"title\":\"[RAM]\nFix
bug where select all rules
bypasses\nfilters\",\"number\":176962,\"url\":\"https://github.com/elastic/kibana/pull/176962\",\"mergeCommit\":{\"message\":\"[RAM]\nFix
bug where select all rules bypasses filters
(#176962)\\n\\n##\nSummary\\r\\n\\r\\nFixes #176867 \\r\\n\\r\\nA bug
introduced
in\nhttps://github.com//pull/174954\\r\\nbypassed most
filters\nwhen using Select All on the Rules List. This was\\r\\nbecause
the names\nof the filter properties changed, and no longer\\r\\nmatched
what the\n`useBulkEditSelect` hook was expecting.\\r\\n\\r\\nBecause all
of these\ntypes were optional, it didn't trigger any
type\\r\\nerrors.\\r\\n\\r\\nThis\nsyncs up the type definitions with
the new filter store hook,\nand\\r\\nadds a functional test to make sure
filters are working on bulk\nactions\\r\\nwhen clicking the select all
button.\\r\\n\\r\\n###\nChecklist\\r\\n\\r\\n- [x] [Unit
or\nfunctional\\r\\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\\r\\nwere\nupdated
or added to match the most
common\nscenarios\",\"sha\":\"e136a9318215d5913a5e957aec5d9ad0b8132506\"}},\"sourceBranch\":\"main\",\"suggestedTargetBranches\":[\"8.13\",\"8.12\"],\"targetPullRequestStates\":[{\"branch\":\"8.13\",\"label\":\"v8.13.0\",\"branchLabelMappingKey\":\"^v(\\\\d+).(\\\\d+).\\\\d+$\",\"isSourceBranch\":false,\"state\":\"NOT_CREATED\"},{\"branch\":\"8.12\",\"label\":\"v8.12.2\",\"branchLabelMappingKey\":\"^v(\\\\d+).(\\\\d+).\\\\d+$\",\"isSourceBranch\":false,\"state\":\"NOT_CREATED\"},{\"branch\":\"main\",\"label\":\"v8.14.0\",\"branchLabelMappingKey\":\"^v8.14.0$\",\"isSourceBranch\":true,\"state\":\"MERGED\",\"url\":\"https://github.com/elastic/kibana/pull/176962\",\"number\":176962,\"mergeCommit\":{\"message\":\"[RAM]\nFix
bug where select all rules bypasses filters
(#176962)\\n\\n##\nSummary\\r\\n\\r\\nFixes #176867 \\r\\n\\r\\nA bug
introduced
in\nhttps://github.com//pull/174954\\r\\nbypassed most
filters\nwhen using Select All on the Rules List. This was\\r\\nbecause
the names\nof the filter properties changed, and no longer\\r\\nmatched
what the\n`useBulkEditSelect` hook was expecting.\\r\\n\\r\\nBecause all
of these\ntypes were optional, it didn't trigger any
type\\r\\nerrors.\\r\\n\\r\\nThis\nsyncs up the type definitions with
the new filter store hook,\nand\\r\\nadds a functional test to make sure
filters are working on bulk\nactions\\r\\nwhen clicking the select all
button.\\r\\n\\r\\n###\nChecklist\\r\\n\\r\\n- [x] [Unit
or\nfunctional\\r\\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\\r\\nwere\nupdated
or added to match the most
common\nscenarios\",\"sha\":\"e136a9318215d5913a5e957aec5d9ad0b8132506\"}}]}]\nBACKPORT-->\n\nCo-authored-by:
Zacqary Adam Xeper
<Zacqary@users.noreply.github.com>"}},{"branch":"8.12","label":"v8.12.2","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.14.0","labelRegex":"^v8.14.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/176962","number":176962,"mergeCommit":{"message":"[RAM]
Fix bug where select all rules bypasses filters (#176962)\n\n##
Summary\r\n\r\nFixes #176867 \r\n\r\nA bug introduced in
https://github.com/elastic/kibana/pull/174954\r\nbypassed most filters
when using Select All on the Rules List. This was\r\nbecause the names
of the filter properties changed, and no longer\r\nmatched what the
`useBulkEditSelect` hook was expecting.\r\n\r\nBecause all of these
types were optional, it didn't trigger any type\r\nerrors.\r\n\r\nThis
syncs up the type definitions with the new filter store hook,
and\r\nadds a functional test to make sure filters are working on bulk
actions\r\nwhen clicking the select all button.\r\n\r\n###
Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"e136a9318215d5913a5e957aec5d9ad0b8132506"}}]}]
BACKPORT-->

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
@kibanamachine kibanamachine added v8.12.3 and removed backport missing Added to PRs automatically when the are determined to be missing a backport. labels Mar 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature:Alerting/RulesManagement Issues related to the Rules Management UX release_note:fix Team:ResponseOps Platform ResponseOps team (formerly the Cases and Alerting teams) t// v8.12.2 v8.12.3 v8.13.0 v8.14.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[RAM] Select all ## rules is by passing filter

6 participants