https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33514 --- Comment #7 from Jonathan Druart <jonathan.druart@gmail.com> --- (In reply to Katrin Fischer from comment #0)
@@ -1047,7 +1047,12 @@ sub _SearchItems_build_where_fragment { if ( C4::Context->preference("SearchWithISBNVariations") and $query ) { my @isbns = C4::Koha::GetVariationsOfISBN( $query ); $query = []; + foreach my $isbn(@isbns) { + $isbn = "%" . $isbn . "%"; + }
IMO this is the correct fix, it's what we do in the 2 other places. C4/Acquisition.pm 2204 if (@isbns) { 2205 $query .= " AND ( biblioitems.isbn LIKE " . join( " OR biblioitems.isbn LIKE ", @isbn_params ) . ")"; 2206 foreach my $isb (@isbns) { 2207 push @query_params, "%$isb%"; 2208 } 2209 } 2107 if ( C4::Context->preference("SearchWithISBNVariations") ) { 2108 @isbns = C4::Koha::GetVariationsOfISBN($isbn); 2109 foreach my $isb (@isbns) { 2110 push @isbn_params, '?'; 2111 } 2112 } C4/Search.pm 1441 if ( C4::Context->preference("SearchWithISBNVariations") ) { 1442 my @isbns = C4::Koha::GetVariationsOfISBN($operand); 1443 $operands[$i] = $operand = '(' . join( ' OR ', map { 'nb=' . $_ } @isbns ) . ')'; 1444 $indexes[$i] = $index = 'kw'; 1445 } 1446 } -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.