From 53067eaa4c04ec7457d6727cfb3f53ea04551e82 Mon Sep 17 00:00:00 2001 From: David Cook Date: Mon, 16 Mar 2026 03:36:11 +0000 Subject: [PATCH] Bug 42102: Try with and without right truncation for ISBN This change widens the ISBN search to try with and without right truncation as different Z39.50 servers appear to handle this differently. Some will ignore it and others will fail to return a result if a full ISBN is provided (like with the Library of Congress currently) Test plan: 0. Do not apply the patch yet 1. Log into koha-testing-docker 2. Do a ISBN search for 9780879933913 for the Library of Congress (Note to use the Z39.50 and NOT the SRU) 3. Note that it doesn't return any results 4. Apply the patch and koha-plack --restart kohadev 5. Do a ISBN search for 9780879933913 for the Library of Congress (Note to use the Z39.50 and NOT the SRU) 6. Note that you get a result 7. Do a ISBN search for 978087993391 for the Library of Congress 8. Note that you get a result with the partial ISBN Signed-off-by: David Nind --- C4/Breeding.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Breeding.pm b/C4/Breeding.pm index bdabd8828a..cf7787053b 100644 --- a/C4/Breeding.pm +++ b/C4/Breeding.pm @@ -253,7 +253,7 @@ sub _bib_build_query { my ($pars) = @_; my $qry_build = { - isbn => '@attr 1=7 @attr 5=1 "#term" ', + isbn => '@or @attr 1=7 "#term" @attr 1=7 @attr 5=1 "#term" ', issn => '@attr 1=8 @attr 5=1 "#term" ', title => '@attr 1=4 "#term" ', author => '@attr 1=1003 "#term" ', -- 2.39.5