From bde08fa3661b895fc7881bd1523c36761c4667d9 Mon Sep 17 00:00:00 2001 From: Katrin Fischer Date: Sat, 11 Aug 2018 23:55:35 +0000 Subject: [PATCH] Bug 20241: Fix display of publication year in subscription record search for MARC21 The old problem: UNIMARC uses biblio.publicationyear, MARC21 uses biblio.copyrightdate. Patch adds a fallback, if there is nothing in publicationyear, copyrightdate will be displayed. To test: - In a MARC21 database - Add a new subscription - Search for records - Verify the publication year column remains empty - Apply patch - Repeat search - Verify that the year now shows https://bugs.koha-community.org/show_bug.cgi?id=20421 Signed-off-by: Michal Denar Signed-off-by: Martin Renvoize Signed-off-by: Nick Clemens (cherry picked from commit 8df47bdde678773f028f312b4cd8000a12425281) Signed-off-by: Martin Renvoize (cherry picked from commit 419f889bb0e0220d81b9883d27aeea128a5b8888) Signed-off-by: Fridolin Somers --- serials/subscription-bib-search.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/serials/subscription-bib-search.pl b/serials/subscription-bib-search.pl index 35159e6754..97b766b2b5 100755 --- a/serials/subscription-bib-search.pl +++ b/serials/subscription-bib-search.pl @@ -128,7 +128,7 @@ if ( $op eq "do_search" && $query ) { $resultsloop{biblionumber} = $biblio->{'biblionumber'}; $resultsloop{author} = $biblio->{'author'}; $resultsloop{publishercode} = $biblio->{'publishercode'}; - $resultsloop{publicationyear} = $biblio->{'publicationyear'}; + $resultsloop{publicationyear} = $biblio->{'publicationyear'} ? $biblio->{'publicationyear'} : $biblio->{'copyrightdate'}; $resultsloop{issn} = $biblio->{'issn'}; push @results, \%resultsloop; -- 2.39.5