Bugzilla – Attachment 177490 Details for
Bug 39020
Search filters can't parse query in some instances
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 39020: Search filters can't parse query
Bug-39020-Search-filters-cant-parse-query.patch (text/plain), 1.46 KB, created by
Roman Dolny
on 2025-02-03 21:57:55 UTC
(
hide
)
Description:
Bug 39020: Search filters can't parse query
Filename:
MIME Type:
Creator:
Roman Dolny
Created:
2025-02-03 21:57:55 UTC
Size:
1.46 KB
patch
obsolete
>From c0db8ec3a69844eb798ddd79798fdbd0794db5fe Mon Sep 17 00:00:00 2001 >From: Lisette Scheer <lisette@bywatersolutions.com> >Date: Mon, 3 Feb 2025 16:19:11 +0000 >Subject: [PATCH] Bug 39020: Search filters can't parse query > >1. Turn on the SavedSearchFilters system preference >2. Go to advanced search, select a number of item types and search >3. Save the search >4. Enter a search term (such as power) >5. select the filter. Observe the following message: >Error: Unable to understand your search query, please rephrase and try again. >6. Apply patch >7. Repeat steps 4 & 5, search should work as expected. >8. Sign off! > >Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> >--- > Koha/SearchFilter.pm | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/Koha/SearchFilter.pm b/Koha/SearchFilter.pm >index 9694c1e31c..a76fb0fd31 100644 >--- a/Koha/SearchFilter.pm >+++ b/Koha/SearchFilter.pm >@@ -51,7 +51,7 @@ sub expand_filter { > my $operands = $query->{operands}; > my $indexes = $query->{indexes}; > >- my $query_limit = "("; >+ my $query_limit = ""; > for( my $i = 0; $i < scalar @$operands; $i++ ){ > next unless @$operands[$i]; > my $index = @$indexes[$i] ? @$indexes[$i] . "=" : ""; >@@ -61,7 +61,7 @@ sub expand_filter { > my $limit = $operator . $index . $query; > $query_limit .= $limit; > } >- $query_limit .= ")"; >+ $query_limit = "(" .$query_limit . ")" if $query_limit; > > return ($limits, $query_limit); > } >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 39020
:
177471
|
177490
|
177689
|
177690
|
177956
|
178042