From 050f43f73c4857b26996e15e3d8b8ad536b32763 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Mon, 7 Oct 2019 17:46:30 +0000 Subject: [PATCH] Bug 23768: Return invalid ISBN when searching with variations To test: 1 - Enable SearchWithISBNVariations and IntranetCatalogSearchPulldown 2 - Refresh page and click on 'Search the catalog' tab 3 - Search for 'ISBN' 0385299209 4 - Note no results 5 - Note the search says if searched 'kw,wrdl: (nb=)' 6 - Apply patch, restart all the things 7 - Repeat search 8 - Search looks correctly formed 9 - Add the isbn above to a record, confirm it is returned by search 10 - Confirm searches for valid ISBNs still work as expected Signed-off-by: Katrin Fischer Signed-off-by: Jonathan Druart Signed-off-by: Martin Renvoize --- C4/Koha.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Koha.pm b/C4/Koha.pm index 9894a060cf..dd0a165a58 100644 --- a/C4/Koha.pm +++ b/C4/Koha.pm @@ -897,7 +897,7 @@ sub GetVariationsOfISBN { my @isbns; - push( @isbns, NormalizeISBN({ isbn => $isbn }) ); + push( @isbns, NormalizeISBN({ isbn => $isbn, return_invalid => 1 }) ); push( @isbns, NormalizeISBN({ isbn => $isbn, format => 'ISBN-10' }) ); push( @isbns, NormalizeISBN({ isbn => $isbn, format => 'ISBN-13' }) ); push( @isbns, NormalizeISBN({ isbn => $isbn, format => 'ISBN-10', strip_hyphens => 1 }) ); -- 2.39.5