Bugzilla – Attachment 95991 Details for
Bug 23970
itemsearch - publication date not taken into account if not used in the first field
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23970: Make search with "Publication date" field work at any position
Bug-23970-Make-search-with-Publication-date-field-.patch (text/plain), 1.81 KB, created by
Joonas Kylmälä
on 2019-12-04 12:15:29 UTC
(
hide
)
Description:
Bug 23970: Make search with "Publication date" field work at any position
Filename:
MIME Type:
Creator:
Joonas Kylmälä
Created:
2019-12-04 12:15:29 UTC
Size:
1.81 KB
patch
obsolete
>From 36a753a7cfe154cbb01d05f08e6f0b3388c0a94a Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 25 Nov 2019 13:35:25 +0100 >Subject: [PATCH] Bug 23970: Make search with "Publication date" field work at > any position >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >The changes made in the following commit: > commit 0d2e83bca5b91376e9262b6cb0b993f09b919018 > Bug 14636: Item search - fix search and sort by publication date for MARC21 >was put at the wrong place. It was inside a "if $i == 1" test that >impacts the first field only. > >Test plan: >0/ Use a MARC21 installation >1/ Search items by publication date, use twice the field using different >values. >For instance: > publication date: 2005 OR > publication date: 2006 >=> Without this patch you only get results for 2005 >=> With this patch applied you get results for both years. > >Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> >--- > catalogue/itemsearch.pl | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > >diff --git a/catalogue/itemsearch.pl b/catalogue/itemsearch.pl >index 090192e231d..4cb76d8b4ea 100755 >--- a/catalogue/itemsearch.pl >+++ b/catalogue/itemsearch.pl >@@ -143,10 +143,11 @@ if (scalar keys %params > 0) { > my $q = shift @q; > my $op = shift @op; > if (defined $q and $q ne '') { >+ if (C4::Context->preference("marcflavour") ne "UNIMARC" && $field eq 'publicationyear') { >+ $field = 'copyrightdate'; >+ } >+ > if ($i == 0) { >- if (C4::Context->preference("marcflavour") ne "UNIMARC" && $field eq 'publicationyear') { >- $field = 'copyrightdate'; >- } > $f = { > field => $field, > query => $q, >-- >2.17.1
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 23970
:
95787
|
95990
|
95991
|
96061