From 0b7fc832ef6a0927b5a8a7375e85074166e68c61 Mon Sep 17 00:00:00 2001 From: Joseph Alway Date: Thu, 20 Sep 2012 12:39:28 -0500 Subject: [PATCH] Bug 8680 Z39.50 ISBN Search is problematic and there is a missing ISSN field. The changes here are duplicate fixes. The cataloguing directory had the same bugs as the acqui directory. The bugs in the cataloguing files of the same name were fixed in Bug 8550. The bugs in the acqui files had not been fixed. This will fix Bug 8680 which is in the Acquisitions Module. Changes to the z3950_search.pl file: Rather than treating ISBN and ISSN as the same, this patch breaks them out into separate parts of the query, as well as changing the truncation attribute to enable right truncation (the correct behavior for the ISBN field in MARC21, and valid behavior in UNIMARC). Changes to the z3950_search.tt file: Sometime in 2009 or so, the ISSN field was removed from the Z39.50 search page, and the ISBN field replaced with a combined ISBN/ISSN field. Since this breaks ISBN search for most Z39.50 targets (due to the differing treatment of ISBN vs. ISSN), this is a bug not a feature. --- acqui/z3950_search.pl | 12 ++++++++---- .../prog/en/modules/acqui/z3950_search.tt | 3 ++- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/acqui/z3950_search.pl b/acqui/z3950_search.pl index 9dc8b6e..a1cdce4 100755 --- a/acqui/z3950_search.pl +++ b/acqui/z3950_search.pl @@ -148,10 +148,14 @@ if ( $op ne "do_search" ) { my $s = 0; my $query; my $nterms; - if ($isbn || $issn) { - $term=$isbn if ($isbn); - $term=$issn if ($issn); - $query .= " \@or \@attr 1=8 \"$term\" \@attr 1=7 \"$term\" "; + if ($isbn) { + $term=$isbn; + $query .= " \@attr 1=7 \@attr 5=1 \"$term\" "; + $nterms++; + } + if ($issn) { + $term=$issn; + $query .= " \@attr 1=8 \@attr 5=1 \"$term\" "; $nterms++; } if ($title) { diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tt index 0d4ef2e..7bb9241 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tt @@ -75,7 +75,7 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color :
  1. -
  2. +
@@ -83,6 +83,7 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color :
  1. +
-- 1.7.2.5