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>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit d6c2124b29)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
parent
f3267b81ee
commit
6b75fe9034
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue