Bug 23970: Make search with "Publication date" field work at any position
The changes made in the following commit: commit0d2e83bca5Bug 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> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com> (cherry picked from commitc589da3c29) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> (cherry picked from commit837604d935) Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
This commit is contained in:
parent
06fe72daea
commit
ad87192f72
|
|
@ -137,10 +137,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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue