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

[Global Search] - mixed case tags not working as expected #196168

Closed
jamie-wilson88 opened this issue Oct 14, 2024 · 1 comment · Fixed by #196819
Closed

[Global Search] - mixed case tags not working as expected #196168

jamie-wilson88 opened this issue Oct 14, 2024 · 1 comment · Fixed by #196819
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Feature:Navigational Search Global search bar good first issue low hanging fruit papercut Small "burr" in the product that we should fix. regression SharedUX/fix-it-week Bugs that have been groomed and queued up for the team's next fix it week Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience)

Comments

@jamie-wilson88
Copy link

jamie-wilson88 commented Oct 14, 2024

Kibana version:
8.15+

Elasticsearch version:

Server OS version:

Browser version:

Browser OS version:

Original install method (e.g. download page, yum, from source, etc.):
Cloud

Describe the bug:
Using the Kibana global search bar, tags with mixed case letters will not appear properly. i.e.:
tag:Logstash

All lower case letter tag names work properly.

Steps to reproduce:

  1. Login to Kibana instance 8.15 or higher
  2. Search for a tag with a capital letter in the top search bar, for example tag:Logstash or tag:System
  3. No results appear

Expected behavior:
A list of tags would appear that match. Creating a tag with all lower case letters works properly.

Screenshots (if relevant):
Image

Errors in browser console (if relevant):

Provide logs and/or server output (if relevant):

Any additional context:
Perhaps related to the change made in #183092 ?
Wrapping in quotes and parenthesis returns results as expected for mixed case tags:
"tag:(Logstash)"
But this method will not return results for all lower-case tag names.

@jamie-wilson88 jamie-wilson88 added the bug Fixes for quality problems that affect the customer experience label Oct 14, 2024
@botelastic botelastic bot added the needs-team Issues missing a team label label Oct 14, 2024
@Dosant Dosant added the Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience) label Oct 14, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/appex-sharedux (Team:SharedUX)

@botelastic botelastic bot removed the needs-team Issues missing a team label label Oct 14, 2024
@Dosant Dosant added regression Feature:Navigational Search Global search bar SharedUX/fix-it-week Bugs that have been groomed and queued up for the team's next fix it week good first issue low hanging fruit labels Oct 14, 2024
@petrklapka petrklapka added the papercut Small "burr" in the product that we should fix. label Oct 17, 2024
@kowalczyk-krzysztof kowalczyk-krzysztof self-assigned this Oct 18, 2024
kowalczyk-krzysztof added a commit that referenced this issue Oct 22, 2024
## Summary

This PR fixes a bug which caused mixed case tags to not be found in
global search.
Fixes: #196168

The `allTags` argument contains tags with names in the original case
they were created but the `tagName` argument passed in
[search_bar.tsx:180](https://github.com/elastic/kibana/blob/main/x-pack/plugins/global_search_bar/public/components/search_bar.tsx#L180)
is lowercase. Since you can't have tags with the same name but different
casing, converting them to lowercase is safe.

I've also added lowercase conversion to `tagName` argument in case this
function gets called somewhere else and the input is not lowercase.
kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Oct 22, 2024
…ic#196819)

## Summary

This PR fixes a bug which caused mixed case tags to not be found in
global search.
Fixes: elastic#196168

The `allTags` argument contains tags with names in the original case
they were created but the `tagName` argument passed in
[search_bar.tsx:180](https://github.com/elastic/kibana/blob/main/x-pack/plugins/global_search_bar/public/components/search_bar.tsx#L180)
is lowercase. Since you can't have tags with the same name but different
casing, converting them to lowercase is safe.

I've also added lowercase conversion to `tagName` argument in case this
function gets called somewhere else and the input is not lowercase.

(cherry picked from commit b495c37)
kibanamachine added a commit that referenced this issue Oct 22, 2024
…196819) (#197193)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Global Search] Fix convertTagNameToId to use lowercase values
(#196819)](#196819)

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

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

<!--BACKPORT [{"author":{"name":"Krzysztof
Kowalczyk","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-22T09:40:42Z","message":"[Global
Search] Fix convertTagNameToId to use lowercase values (#196819)\n\n##
Summary\r\n\r\nThis PR fixes a bug which caused mixed case tags to not
be found in\r\nglobal search.\r\nFixes: #196168\r\n\r\nThe `allTags`
argument contains tags with names in the original case\r\nthey were
created but the `tagName` argument passed
in\r\n[search_bar.tsx:180](https://github.com/elastic/kibana/blob/main/x-pack/plugins/global_search_bar/public/components/search_bar.tsx#L180)\r\nis
lowercase. Since you can't have tags with the same name but
different\r\ncasing, converting them to lowercase is safe.\r\n\r\nI've
also added lowercase conversion to `tagName` argument in case
this\r\nfunction gets called somewhere else and the input is not
lowercase.","sha":"b495c371fd946f39341a557599033647f81cdbf3","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:skip","v9.0.0","Feature:Navigational
Search","Team:SharedUX","backport:prev-minor"],"title":"[Global Search]
Fix convertTagNameToId to use lowercase
values","number":196819,"url":"https://github.com/elastic/kibana/pull/196819","mergeCommit":{"message":"[Global
Search] Fix convertTagNameToId to use lowercase values (#196819)\n\n##
Summary\r\n\r\nThis PR fixes a bug which caused mixed case tags to not
be found in\r\nglobal search.\r\nFixes: #196168\r\n\r\nThe `allTags`
argument contains tags with names in the original case\r\nthey were
created but the `tagName` argument passed
in\r\n[search_bar.tsx:180](https://github.com/elastic/kibana/blob/main/x-pack/plugins/global_search_bar/public/components/search_bar.tsx#L180)\r\nis
lowercase. Since you can't have tags with the same name but
different\r\ncasing, converting them to lowercase is safe.\r\n\r\nI've
also added lowercase conversion to `tagName` argument in case
this\r\nfunction gets called somewhere else and the input is not
lowercase.","sha":"b495c371fd946f39341a557599033647f81cdbf3"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/196819","number":196819,"mergeCommit":{"message":"[Global
Search] Fix convertTagNameToId to use lowercase values (#196819)\n\n##
Summary\r\n\r\nThis PR fixes a bug which caused mixed case tags to not
be found in\r\nglobal search.\r\nFixes: #196168\r\n\r\nThe `allTags`
argument contains tags with names in the original case\r\nthey were
created but the `tagName` argument passed
in\r\n[search_bar.tsx:180](https://github.com/elastic/kibana/blob/main/x-pack/plugins/global_search_bar/public/components/search_bar.tsx#L180)\r\nis
lowercase. Since you can't have tags with the same name but
different\r\ncasing, converting them to lowercase is safe.\r\n\r\nI've
also added lowercase conversion to `tagName` argument in case
this\r\nfunction gets called somewhere else and the input is not
lowercase.","sha":"b495c371fd946f39341a557599033647f81cdbf3"}}]}]
BACKPORT-->

Co-authored-by: Krzysztof Kowalczyk <[email protected]>
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 Feature:Navigational Search Global search bar good first issue low hanging fruit papercut Small "burr" in the product that we should fix. regression SharedUX/fix-it-week Bugs that have been groomed and queued up for the team's next fix it week Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants