diff --git a/C4/Search.pm b/C4/Search.pm index 5abf66b842..6c7bdab426 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)