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 filter conditions with like/startswith/endswith #2408

Merged

Conversation

petrjasek
Copy link
Member

use regex.search instead of regex.match which is not looking for the whole thing to match but it can match anywhere in the value.

we're adding .* before and after the regex, but that doesn't work with filters like Foo|Bar|Baz as those .* are only applied to the begging and then Bar would only match if it's the only content in the field.

SDESK-6755

use `regex.search` instead of `regex.match` which is not
looking for the whole thing to match but it can match anywhere
in the value.

we're adding `.*` before and after the regex, but that doesn't work
with filters like `Foo|Bar|Baz` as those `.*` are only applied to the
begging and then `Bar` would only match if it's the only content
in the field.

SDESK-6755
@petrjasek petrjasek added this to the 2.6 milestone Dec 8, 2022
@petrjasek petrjasek merged commit f1c0e72 into superdesk:release/2.6 Dec 9, 2022
@petrjasek petrjasek deleted the fix-filter-conditions-like branch December 9, 2022 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants