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

[Security Solution][Exceptions] - Fix empty combo box entry option for exception item condition #151398

Merged
merged 6 commits into from Feb 23, 2023

Conversation

yctercero
Copy link
Contributor

@yctercero yctercero commented Feb 16, 2023

Summary

Addresses #145540

Filters out the empty default entry item from combo box option.

Screenshot 2023-02-15 at 9 42 42 PM

Checklist

@yctercero yctercero requested a review from a team as a code owner February 16, 2023 05:44
@yctercero yctercero self-assigned this Feb 16, 2023
@yctercero yctercero added bug Fixes for quality problems that affect the customer experience release_note:fix Team:Security Solution Platform Security Solution Platform Team v8.7.0 labels Feb 16, 2023
@@ -32,7 +32,7 @@ const getExistingFields = (indexPattern: DataViewBase | undefined): DataViewFiel
};

const getSelectedFields = (selectedField: DataViewField | undefined): DataViewFieldBase[] => {
return selectedField ? [selectedField] : [];
return selectedField && selectedField.name.trim() !== '' ? [selectedField] : [];
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: can't we use the paramContainsSpace for checking the electedField && selectedField.name.trim() !== '' so that we can unify the condition in different places ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated!

@yctercero yctercero enabled auto-merge (squash) February 23, 2023 00:36
@yctercero yctercero added v8.8.0 auto-backport Deprecated: Automatically backport this PR after it's merged backport:prev-minor Backport to the previous minor version (i.e. one version back from main) labels Feb 23, 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
lists 152.8KB 152.8KB +7.0B
securitySolution 13.8MB 13.8MB +24.0B
total +31.0B

History

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

cc @yctercero

@yctercero yctercero merged commit 28f4f1b into elastic:main Feb 23, 2023
kibanamachine pushed a commit that referenced this pull request Feb 23, 2023
…r exception item condition (#151398)

## Summary

Addresses #145540

Filters out the empty default entry item from combo box option.

(cherry picked from commit 28f4f1b)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.7

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

Questions ?

Please refer to the Backport tool documentation and see the Github Action logs for details

kibanamachine added a commit that referenced this pull request Feb 23, 2023
…ion for exception item condition (#151398) (#151959)

# Backport

This will backport the following commits from `main` to `8.7`:
- [[Security Solution][Exceptions] - Fix empty combo box entry option
for exception item condition
(#151398)](#151398)

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

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

<!--BACKPORT [{"author":{"name":"Yara
Tercero","email":"yctercero@users.noreply.github.com"},"sourceCommit":{"committedDate":"2023-02-23T02:10:38Z","message":"[Security
Solution][Exceptions] - Fix empty combo box entry option for exception
item condition (#151398)\n\n## Summary\r\n\r\nAddresses
#145540 out the
empty default entry item from combo box
option.","sha":"28f4f1b457e5e15100b51b26f76d7c13bad3dc90","branchLabelMapping":{"^v8.8.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix","auto-backport","Team:Security
Solution
Platform","backport:prev-minor","v8.7.0","v8.8.0"],"number":151398,"url":"#151398
Solution][Exceptions] - Fix empty combo box entry option for exception
item condition (#151398)\n\n## Summary\r\n\r\nAddresses
#145540 out the
empty default entry item from combo box
option.","sha":"28f4f1b457e5e15100b51b26f76d7c13bad3dc90"}},"sourceBranch":"main","suggestedTargetBranches":["8.7"],"targetPullRequestStates":[{"branch":"8.7","label":"v8.7.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.8.0","labelRegex":"^v8.8.0$","isSourceBranch":true,"state":"MERGED","url":"#151398
Solution][Exceptions] - Fix empty combo box entry option for exception
item condition (#151398)\n\n## Summary\r\n\r\nAddresses
#145540 out the
empty default entry item from combo box
option.","sha":"28f4f1b457e5e15100b51b26f76d7c13bad3dc90"}}]}]
BACKPORT-->

Co-authored-by: Yara Tercero <yctercero@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated: Automatically backport this PR after it's merged backport:prev-minor Backport to the previous minor version (i.e. one version back from main) bug Fixes for quality problems that affect the customer experience release_note:fix Team:Security Solution Platform Security Solution Platform Team v8.7.0 v8.8.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants