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

[RAM] Alerts Table breaking when adding first column in fields browser #156557

Merged
merged 1 commit into from
May 3, 2023

Conversation

jcger
Copy link
Contributor

@jcger jcger commented May 3, 2023

Fixes #156001

We previously overlooked a scenario where no columns were displayed. When generating the output array of columns, the code would insert an empty entry at the beginning because 'columns[0]' was undefined (check current code), which later caused an error. To resolve this issue without processing again all elements in the entire array, we now check if the current columns display array is empty. If it is, we return a new array containing only the user-added column and exit early.

@jcger jcger added bug Fixes for quality problems that affect the customer experience release_note:fix Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) v8.8.0 labels May 3, 2023
@jcger jcger marked this pull request as ready for review May 3, 2023 14:22
@jcger jcger requested a review from a team as a code owner May 3, 2023 14:22
@elasticmachine
Copy link
Contributor

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

@jcger jcger changed the title fix missing use case [RAM] Alerts Table breaking when adding first column in fields browser May 3, 2023
@jcger jcger enabled auto-merge (squash) May 3, 2023 14:35
@XavierM XavierM added the v8.9.0 label May 3, 2023
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

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.4MB 1.4MB +17.0B
Unknown metric groups

ESLint disabled line counts

id before after diff
enterpriseSearch 19 21 +2
securitySolution 399 402 +3
total +5

Total ESLint disabled count

id before after diff
enterpriseSearch 20 22 +2
securitySolution 479 482 +3
total +5

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

@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.8

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

Questions ?

Please refer to the Backport tool documentation

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request May 3, 2023
kibanamachine added a commit that referenced this pull request May 3, 2023
…browser (#156557) (#156572)

# Backport

This will backport the following commits from `main` to `8.8`:
- [[RAM] Alerts Table breaking when adding first column in fields
browser (#156557)](#156557)

<!--- Backport version: 8.9.7 -->

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

<!--BACKPORT [{"author":{"name":"Julian
Gernun","email":"17549662+jcger@users.noreply.github.com"},"sourceCommit":{"committedDate":"2023-05-03T15:30:14Z","message":"[RAM]
Alerts Table breaking when adding first column in fields browser
(#156557)\n\nFixes
#156001
Alerts Table breaking when adding first column in fields browser
(#156557)\n\nFixes
#156001
Alerts Table breaking when adding first column in fields browser
(#156557)\n\nFixes
#156001"}}]}]
BACKPORT-->

Co-authored-by: Julian Gernun <17549662+jcger@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience release_note:fix Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) v8.8.0 v8.9.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Security Solution]Red banner occurs when user add fields for Alerts table after hiding all the columns.
6 participants