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

change escalation chains searching to allow for partial searching #1578

Merged
merged 1 commit into from
Mar 20, 2023

Conversation

joeyorlando
Copy link
Contributor

Which issue(s) this PR fixes

Previously if you had an Escalation Chain named "Something Critical" and tried searching for "Critical", it would return no results. This was because the backend was using a "starts-with" search on the name attribute.

This PR changes that to use "partial searching" + adds a few e2e test cases.

Checklist

  • Tests updated
  • Documentation added (N/A)
  • CHANGELOG.md updated

@joeyorlando joeyorlando added the pr:no public docs Added to a PR that does not require public documentation updates label Mar 20, 2023
@joeyorlando joeyorlando requested review from a team March 20, 2023 14:15
@@ -46,7 +46,7 @@ class EscalationChainViewSet(
}

filter_backends = [SearchFilter]
search_fields = ("^name",)
search_fields = ("name",)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@joeyorlando joeyorlando force-pushed the jorlando/fix-escalation-chains-searching branch from bcee300 to b89369b Compare March 20, 2023 14:23
@joeyorlando joeyorlando merged commit 7ea5b07 into dev Mar 20, 2023
@joeyorlando joeyorlando deleted the jorlando/fix-escalation-chains-searching branch March 20, 2023 14:51
brojd pushed a commit that referenced this pull request Sep 18, 2024
)

# Which issue(s) this PR fixes

Previously if you had an Escalation Chain named "Something Critical" and
tried searching for "Critical", it would return no results. This was
because the backend was using a "starts-with" search on the `name`
attribute.

This PR changes that to use "partial searching" + adds a few e2e test
cases.

## Checklist

- [x] Tests updated
- [ ] Documentation added (N/A)
- [x] `CHANGELOG.md` updated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr:no public docs Added to a PR that does not require public documentation updates
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants