Skip to content
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

Merged

Conversation

janmonschke
Copy link
Contributor

@janmonschke janmonschke commented Oct 21, 2024

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:

  • Make sure thefile.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:

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?

@janmonschke janmonschke added backport release_note:skip Skip the PR/issue when compiling release notes v9.0.0 Team:Threat Hunting:Investigations Security Solution Investigations Team v8.16.0 labels Oct 21, 2024
@janmonschke janmonschke self-assigned this Oct 21, 2024
@janmonschke janmonschke requested a review from a team as a code owner October 21, 2024 12:14
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-threat-hunting-investigations (Team:Threat Hunting:Investigations)

@janmonschke janmonschke changed the title [SecuirtySolution] Fix issue of disappearing columns in the alerts table [SecuritySolution] Fix issue of disappearing columns in the alerts table Oct 21, 2024
@@ -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),
Copy link
Contributor

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?

Copy link
Contributor Author

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 :)

Copy link
Contributor

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 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jcger Wdyt about 25b3a21 ?

@janmonschke
Copy link
Contributor Author

@elasticmachine merge upstream

@janmonschke janmonschke enabled auto-merge (squash) October 24, 2024 11:13
@janmonschke janmonschke merged commit d74b70f into elastic:main Oct 24, 2024
24 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.16, 8.x

https://github.com/elastic/kibana/actions/runs/11499052532

@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] Jest Tests #1 / useSetupTechnology should not update agent policy and selected policy tab when setup technology matches the current one

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.7MB 1.7MB +15.0B

cc @janmonschke

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Oct 24, 2024
…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)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Oct 24, 2024
…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)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.16
8.x

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 Oct 24, 2024
…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]>
kibanamachine added a commit that referenced this pull request Oct 24, 2024
…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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport release_note:skip Skip the PR/issue when compiling release notes Team:Threat Hunting:Investigations Security Solution Investigations Team v8.16.0 v8.17.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[SecuritySolution] Columns can disappear from the alerts table
4 participants