-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SecuritySolution] Fix issue of disappearing columns in the alerts table #197043
[SecuritySolution] Fix issue of disappearing columns in the alerts table #197043
Conversation
Pinging @elastic/security-threat-hunting-investigations (Team:Threat Hunting:Investigations) |
@@ -413,7 +413,7 @@ const AlertsTable: React.FunctionComponent<AlertsTableProps> = memo((props: Aler | |||
rowSelection: bulkActionsState.rowSelection, | |||
alerts, | |||
isLoading, | |||
columnIds: visibleColumns, | |||
columnIds: columns.map((column) => column.id), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you please add a test to ensure it doesn't happen again?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, I asked for help from your team on this above:
@elastic/response-ops Got any ideas on how to best add unit tests for this?
Testing this isn't straight forward, at least not to me since I'm not familiar with the whole testing architecture around the alerts table. I would greatly appreciate your input here :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry I missed the message.
Maybe a test that updates the browserField prop using rtl's rerender method in x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/alerts_table.test.tsx
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@elasticmachine merge upstream |
Starting backport for target branches: 8.16, 8.x https://github.com/elastic/kibana/actions/runs/11499052532 |
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Async chunks
cc @janmonschke |
…ble (elastic#197043) ## Summary Fixes: elastic#196877 The issue above describes a situation in which columns can disappear when toggling them in a certain order in the "Columns" and "Fields". Steps to reproduce the original issue: - Make sure the`file.name` column us visible in the alerts table, the `Fields` popup and in the `Columns` selector - Hide the `file.name` column from the `Columns` selector - Go to `Fields` and enable the `file.name` field - Observe that the column isn't showing up in the table - The `file.name` column is also not showing up in the `Columns` selector anymore. The issue has a video demonstration attached to it as well. With this fix applied, the column does not "disappear" anymore: https://github.com/user-attachments/assets/4056f297-584a-4713-8936-b4e3ac3339a0 ### Checklist - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the common scenarios @elastic/response-ops Got any ideas on how to best add unit tests for this? --------- Co-authored-by: Elastic Machine <[email protected]> (cherry picked from commit d74b70f)
…ble (elastic#197043) ## Summary Fixes: elastic#196877 The issue above describes a situation in which columns can disappear when toggling them in a certain order in the "Columns" and "Fields". Steps to reproduce the original issue: - Make sure the`file.name` column us visible in the alerts table, the `Fields` popup and in the `Columns` selector - Hide the `file.name` column from the `Columns` selector - Go to `Fields` and enable the `file.name` field - Observe that the column isn't showing up in the table - The `file.name` column is also not showing up in the `Columns` selector anymore. The issue has a video demonstration attached to it as well. With this fix applied, the column does not "disappear" anymore: https://github.com/user-attachments/assets/4056f297-584a-4713-8936-b4e3ac3339a0 ### Checklist - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the common scenarios @elastic/response-ops Got any ideas on how to best add unit tests for this? --------- Co-authored-by: Elastic Machine <[email protected]> (cherry picked from commit d74b70f)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…erts table (#197043) (#197624) # Backport This will backport the following commits from `main` to `8.16`: - [[SecuritySolution] Fix issue of disappearing columns in the alerts table (#197043)](#197043) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Jan Monschke","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-24T12:14:29Z","message":"[SecuritySolution] Fix issue of disappearing columns in the alerts table (#197043)\n\n## Summary\r\n\r\nFixes: https://github.com/elastic/kibana/issues/196877\r\n\r\nThe issue above describes a situation in which columns can disappear\r\nwhen toggling them in a certain order in the \"Columns\" and \"Fields\".\r\n\r\nSteps to reproduce the original issue:\r\n\r\n- Make sure the`file.name` column us visible in the alerts table, the\r\n`Fields` popup and in the `Columns` selector\r\n- Hide the `file.name` column from the `Columns` selector\r\n- Go to `Fields` and enable the `file.name` field\r\n- Observe that the column isn't showing up in the table\r\n- The `file.name` column is also not showing up in the `Columns`\r\nselector anymore.\r\n\r\nThe issue has a video demonstration attached to it as well.\r\n\r\nWith this fix applied, the column does not \"disappear\" anymore:\r\n\r\n\r\nhttps://github.com/user-attachments/assets/4056f297-584a-4713-8936-b4e3ac3339a0\r\n\r\n### Checklist\r\n- [ ] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the common scenarios\r\n\r\n@elastic/response-ops Got any ideas on how to best add unit tests for\r\nthis?\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine <[email protected]>","sha":"d74b70f7f5c64b5fa4166d761b48c211c2d5abac","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["backport","release_note:skip","v9.0.0","Team:Threat Hunting:Investigations","v8.16.0"],"title":"[SecuritySolution] Fix issue of disappearing columns in the alerts table","number":197043,"url":"https://github.com/elastic/kibana/pull/197043","mergeCommit":{"message":"[SecuritySolution] Fix issue of disappearing columns in the alerts table (#197043)\n\n## Summary\r\n\r\nFixes: https://github.com/elastic/kibana/issues/196877\r\n\r\nThe issue above describes a situation in which columns can disappear\r\nwhen toggling them in a certain order in the \"Columns\" and \"Fields\".\r\n\r\nSteps to reproduce the original issue:\r\n\r\n- Make sure the`file.name` column us visible in the alerts table, the\r\n`Fields` popup and in the `Columns` selector\r\n- Hide the `file.name` column from the `Columns` selector\r\n- Go to `Fields` and enable the `file.name` field\r\n- Observe that the column isn't showing up in the table\r\n- The `file.name` column is also not showing up in the `Columns`\r\nselector anymore.\r\n\r\nThe issue has a video demonstration attached to it as well.\r\n\r\nWith this fix applied, the column does not \"disappear\" anymore:\r\n\r\n\r\nhttps://github.com/user-attachments/assets/4056f297-584a-4713-8936-b4e3ac3339a0\r\n\r\n### Checklist\r\n- [ ] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the common scenarios\r\n\r\n@elastic/response-ops Got any ideas on how to best add unit tests for\r\nthis?\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine <[email protected]>","sha":"d74b70f7f5c64b5fa4166d761b48c211c2d5abac"}},"sourceBranch":"main","suggestedTargetBranches":["8.16"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/197043","number":197043,"mergeCommit":{"message":"[SecuritySolution] Fix issue of disappearing columns in the alerts table (#197043)\n\n## Summary\r\n\r\nFixes: https://github.com/elastic/kibana/issues/196877\r\n\r\nThe issue above describes a situation in which columns can disappear\r\nwhen toggling them in a certain order in the \"Columns\" and \"Fields\".\r\n\r\nSteps to reproduce the original issue:\r\n\r\n- Make sure the`file.name` column us visible in the alerts table, the\r\n`Fields` popup and in the `Columns` selector\r\n- Hide the `file.name` column from the `Columns` selector\r\n- Go to `Fields` and enable the `file.name` field\r\n- Observe that the column isn't showing up in the table\r\n- The `file.name` column is also not showing up in the `Columns`\r\nselector anymore.\r\n\r\nThe issue has a video demonstration attached to it as well.\r\n\r\nWith this fix applied, the column does not \"disappear\" anymore:\r\n\r\n\r\nhttps://github.com/user-attachments/assets/4056f297-584a-4713-8936-b4e3ac3339a0\r\n\r\n### Checklist\r\n- [ ] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the common scenarios\r\n\r\n@elastic/response-ops Got any ideas on how to best add unit tests for\r\nthis?\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine <[email protected]>","sha":"d74b70f7f5c64b5fa4166d761b48c211c2d5abac"}},{"branch":"8.16","label":"v8.16.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Jan Monschke <[email protected]>
…rts table (#197043) (#197625) # Backport This will backport the following commits from `main` to `8.x`: - [[SecuritySolution] Fix issue of disappearing columns in the alerts table (#197043)](#197043) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Jan Monschke","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-24T12:14:29Z","message":"[SecuritySolution] Fix issue of disappearing columns in the alerts table (#197043)\n\n## Summary\r\n\r\nFixes: https://github.com/elastic/kibana/issues/196877\r\n\r\nThe issue above describes a situation in which columns can disappear\r\nwhen toggling them in a certain order in the \"Columns\" and \"Fields\".\r\n\r\nSteps to reproduce the original issue:\r\n\r\n- Make sure the`file.name` column us visible in the alerts table, the\r\n`Fields` popup and in the `Columns` selector\r\n- Hide the `file.name` column from the `Columns` selector\r\n- Go to `Fields` and enable the `file.name` field\r\n- Observe that the column isn't showing up in the table\r\n- The `file.name` column is also not showing up in the `Columns`\r\nselector anymore.\r\n\r\nThe issue has a video demonstration attached to it as well.\r\n\r\nWith this fix applied, the column does not \"disappear\" anymore:\r\n\r\n\r\nhttps://github.com/user-attachments/assets/4056f297-584a-4713-8936-b4e3ac3339a0\r\n\r\n### Checklist\r\n- [ ] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the common scenarios\r\n\r\n@elastic/response-ops Got any ideas on how to best add unit tests for\r\nthis?\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine <[email protected]>","sha":"d74b70f7f5c64b5fa4166d761b48c211c2d5abac","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["backport","release_note:skip","v9.0.0","Team:Threat Hunting:Investigations","v8.16.0"],"title":"[SecuritySolution] Fix issue of disappearing columns in the alerts table","number":197043,"url":"https://github.com/elastic/kibana/pull/197043","mergeCommit":{"message":"[SecuritySolution] Fix issue of disappearing columns in the alerts table (#197043)\n\n## Summary\r\n\r\nFixes: https://github.com/elastic/kibana/issues/196877\r\n\r\nThe issue above describes a situation in which columns can disappear\r\nwhen toggling them in a certain order in the \"Columns\" and \"Fields\".\r\n\r\nSteps to reproduce the original issue:\r\n\r\n- Make sure the`file.name` column us visible in the alerts table, the\r\n`Fields` popup and in the `Columns` selector\r\n- Hide the `file.name` column from the `Columns` selector\r\n- Go to `Fields` and enable the `file.name` field\r\n- Observe that the column isn't showing up in the table\r\n- The `file.name` column is also not showing up in the `Columns`\r\nselector anymore.\r\n\r\nThe issue has a video demonstration attached to it as well.\r\n\r\nWith this fix applied, the column does not \"disappear\" anymore:\r\n\r\n\r\nhttps://github.com/user-attachments/assets/4056f297-584a-4713-8936-b4e3ac3339a0\r\n\r\n### Checklist\r\n- [ ] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the common scenarios\r\n\r\n@elastic/response-ops Got any ideas on how to best add unit tests for\r\nthis?\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine <[email protected]>","sha":"d74b70f7f5c64b5fa4166d761b48c211c2d5abac"}},"sourceBranch":"main","suggestedTargetBranches":["8.16"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/197043","number":197043,"mergeCommit":{"message":"[SecuritySolution] Fix issue of disappearing columns in the alerts table (#197043)\n\n## Summary\r\n\r\nFixes: https://github.com/elastic/kibana/issues/196877\r\n\r\nThe issue above describes a situation in which columns can disappear\r\nwhen toggling them in a certain order in the \"Columns\" and \"Fields\".\r\n\r\nSteps to reproduce the original issue:\r\n\r\n- Make sure the`file.name` column us visible in the alerts table, the\r\n`Fields` popup and in the `Columns` selector\r\n- Hide the `file.name` column from the `Columns` selector\r\n- Go to `Fields` and enable the `file.name` field\r\n- Observe that the column isn't showing up in the table\r\n- The `file.name` column is also not showing up in the `Columns`\r\nselector anymore.\r\n\r\nThe issue has a video demonstration attached to it as well.\r\n\r\nWith this fix applied, the column does not \"disappear\" anymore:\r\n\r\n\r\nhttps://github.com/user-attachments/assets/4056f297-584a-4713-8936-b4e3ac3339a0\r\n\r\n### Checklist\r\n- [ ] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the common scenarios\r\n\r\n@elastic/response-ops Got any ideas on how to best add unit tests for\r\nthis?\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine <[email protected]>","sha":"d74b70f7f5c64b5fa4166d761b48c211c2d5abac"}},{"branch":"8.16","label":"v8.16.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Jan Monschke <[email protected]>
Summary
Fixes: #196877
The issue above describes a situation in which columns can disappear when toggling them in a certain order in the "Columns" and "Fields".
Steps to reproduce the original issue:
file.name
column us visible in the alerts table, theFields
popup and in theColumns
selectorfile.name
column from theColumns
selectorFields
and enable thefile.name
fieldfile.name
column is also not showing up in theColumns
selector anymore.The issue has a video demonstration attached to it as well.
With this fix applied, the column does not "disappear" anymore:
Screen.Recording.2024-10-21.at.13.38.10.mov
Checklist
@elastic/response-ops Got any ideas on how to best add unit tests for this?