Bug 23919: Zebra search by ISSN variations

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Slava Shishkin 2022-04-26 23:38:33 +03:00 committed by Tomas Cohen Arazi
parent b789571ff5
commit a18da2b21f
No known key found for this signature in database
GPG Key ID: 0A272EA1B2F3C15F
1 changed files with 7 additions and 0 deletions

View File

@ -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)