From a82e92a728a6aeb7dcaf6b715c0b0f697be3c50a Mon Sep 17 00:00:00 2001 From: Slava Shishkin Date: Tue, 26 Apr 2022 23:38:33 +0300 Subject: [PATCH] Bug 23919: Zebra search by ISSN variations Signed-off-by: David Nind Signed-off-by: Kyle M Hall --- C4/Search.pm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/C4/Search.pm b/C4/Search.pm index 5abf66b8423..6c7bdab426d 100644 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -1420,6 +1420,13 @@ sub buildQuery { $indexes[$i] = $index = 'kw'; } } + if ( $index eq 'ns' ) { + if ( C4::Context->preference("SearchWithISSNVariations") ) { + my @issns = C4::Koha::GetVariationsOfISSN( $operand ); + $operands[$i] = $operand = '(ns=' . join(' OR ns=', @issns) . ')'; + $indexes[$i] = $index = 'kw'; + } + } } # Set default structure attribute (word list) -- 2.30.2