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

fix: prefix search #3234

Merged
merged 5 commits into from
Aug 28, 2023
Merged

fix: prefix search #3234

merged 5 commits into from
Aug 28, 2023

Conversation

andrewbenington
Copy link
Contributor

@andrewbenington andrewbenington commented Aug 17, 2023

  • Identified the issue which this PR solves.
  • Read the CONTRIBUTING document.
  • Code builds clean without any errors or warnings.
  • Added appropriate tests for any new functionality.
  • All new and existing tests passed.
  • Added comments in the code, where necessary.
  • Ran make check to catch common errors. Fixed any that came up.

Description:

  • Searching list pages (users, escalation policies, rotations, schedules, notifications, and services) only shows results that match the order of the search terms.
  • Words can be skipped (e.g. the search "Serv Two" will return both "Service Two" and "Service One Two")

Before:
Screenshot 2023-08-17 at 12 57 45 PM
Screenshot 2023-08-17 at 12 57 35 PM

After:
Screenshot 2023-08-17 at 12 20 49 PM
Screenshot 2023-08-17 at 12 20 55 PM

Which issue(s) this PR fixes:
Fixes #3217

Describe any introduced API changes:
Anything using prefixSearch now uses orderedPrefixSearch, which queries with a single regex.

Examples (\m matches beginning of word):
\m{term 1}
\m{term 1}.*\m{term 2}
\m{term 1}.*\m{term 2}.*\m{term 3}

@andrewbenington andrewbenington changed the title Fix/prefix search fix: prefix search Aug 17, 2023
@andrewbenington andrewbenington marked this pull request as ready for review August 17, 2023 20:39
Copy link
Collaborator

@tony-tvu tony-tvu left a comment

Choose a reason for hiding this comment

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

lgtm

@andrewbenington andrewbenington merged commit 8cee583 into master Aug 28, 2023
@andrewbenington andrewbenington deleted the fix/prefix-search branch August 28, 2023 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: user search select not displaying exact search results
3 participants