Bug 26364: Remove false matches on isbn

The test here was returning 0590353403 when searched for 9780590353403
because of the regex matching

Koha doesn't work this way unless SearchWithISBNVariations is set to 'search'
and you use a dropdown to select ISBN for searching

To test:
1 - Search catalog for nb=9780590353403
2 - Confirm you don't have results, or delete the records with results
3 - Add isbn 0590353403 to a record
4 - Repeat search, fails
5 - Enable SearchWithISBNVariations
6 - Repeat search, fails
7 - Go to advanced search, select ISBN, search for 9780590353403
8 - Get results

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 854d404a9c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
Nick Clemens 2020-09-09 13:33:17 +00:00 committed by Fridolin Somers
parent adb5ed8037
commit c6ce4f6fc8
1 changed files with 3 additions and 3 deletions

View File

@ -108,13 +108,13 @@ sub Mock_simple_search_compat {
$query =~ s/-//g;
my $ret_biblionumber;
if ( $query =~ /$isbn1/ ) {
if ( $query eq "nb=$isbn1" ) {
$ret_biblionumber = $biblionumber1;
}
elsif ( $query =~ /$isbn2/ ) {
elsif ( $query eq "nb=$isbn2" ) {
$ret_biblionumber = $biblionumber2;
}
elsif ( $query =~ /$isbn3/ ) {
elsif ( $query eq "nb=$isbn3" ) {
$ret_biblionumber = $biblionumber3;
}