Bugzilla – Attachment 114819 Details for
Bug 26364
XISBN.t makes a bad assumption about return values
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26364: Remove false matches on isbn
Bug-26364-Remove-false-matches-on-isbn.patch (text/plain), 1.58 KB, created by
Katrin Fischer
on 2021-01-04 22:18:04 UTC
(
hide
)
Description:
Bug 26364: Remove false matches on isbn
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2021-01-04 22:18:04 UTC
Size:
1.58 KB
patch
obsolete
>From 4715e06812a2a5583b570db15e9ee702d8fb050f Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Wed, 9 Sep 2020 13:33:17 +0000 >Subject: [PATCH] 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> >--- > t/db_dependent/XISBN.t | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > >diff --git a/t/db_dependent/XISBN.t b/t/db_dependent/XISBN.t >index 0689273df5..c8e64e0938 100755 >--- a/t/db_dependent/XISBN.t >+++ b/t/db_dependent/XISBN.t >@@ -104,13 +104,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; > } > >-- >2.11.0
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 26364
:
109599
|
109631
|
109821
|
109822
|
109823
|
109824
|
109825
|
113054
|
113055
|
113056
|
113057
|
113058
|
114818
| 114819 |
114820
|
114821
|
114822