Bug 28269: Add feature to search Acquisitions Orders by ISSN
- add search form field for ISSN number - add search logic including ISSN variations search if SearchWithISSNVariations preference is set Signed-off-by: KIT Library Germany <michaela.sieber@kit.edu> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
94cfb6b8f2
commit
4443f9828c
|
|
@ -2085,6 +2085,7 @@ sub GetHistory {
|
|||
my $title = $params{title};
|
||||
my $author = $params{author};
|
||||
my $isbn = $params{isbn};
|
||||
my $issn = $params{issn};
|
||||
my $ean = $params{ean};
|
||||
my $name = $params{name};
|
||||
my $internalnote = $params{internalnote};
|
||||
|
|
@ -2126,6 +2127,20 @@ sub GetHistory {
|
|||
}
|
||||
}
|
||||
|
||||
#get variation of issn
|
||||
my @issn_params;
|
||||
my @issns;
|
||||
if ($issn){
|
||||
if ( C4::Context->preference("SearchWithISSNVariations") ){
|
||||
@issns = C4::Koha::GetVariationsOfISSN( $issn );
|
||||
push @issn_params, ('?') x @issns;
|
||||
}
|
||||
unless (@issns){
|
||||
push @issns, $issn;
|
||||
push @issn_params, '?';
|
||||
}
|
||||
}
|
||||
|
||||
my $dbh = C4::Context->dbh;
|
||||
my $query ="
|
||||
SELECT
|
||||
|
|
@ -2204,6 +2219,13 @@ sub GetHistory {
|
|||
}
|
||||
}
|
||||
|
||||
if ( @issns ) {
|
||||
$query .= " AND ( biblioitems.issn LIKE " . join (" OR biblioitems.issn LIKE ", @issn_params ) . ")";
|
||||
foreach my $isn (@issns){
|
||||
push @query_params, "%$isn%";
|
||||
}
|
||||
}
|
||||
|
||||
if ( $ean ) {
|
||||
$query .= " AND biblioitems.ean = ? ";
|
||||
push @query_params, "$ean";
|
||||
|
|
|
|||
|
|
@ -75,6 +75,7 @@ my $filters = {
|
|||
title => scalar $input->param('title'),
|
||||
author => scalar $input->param('author'),
|
||||
isbn => scalar $input->param('isbn'),
|
||||
issn => scalar $input->param('issn'),
|
||||
name => scalar $input->param('name'),
|
||||
internalnote => scalar $input->param('internalnote'),
|
||||
vendornote => scalar $input->param('vendornote'),
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
<li><label for="title">Title: </label> <input type="text" name="title" id="title" value="[% filters.title | html %]" /></li>
|
||||
<li><label for="author">Author: </label> <input type="text" name="author" id="author" value="[% filters.author | html %]" /></li>
|
||||
<li><label for="isbn">ISBN: </label> <input type="text" name="isbn" id="isbn" value="[% filters.isbn | html %]" /></li>
|
||||
<li><label for="isbn">ISSN: </label> <input type="text" name="issn" id="issn" value="[% filters.issn | html %]" /></li>
|
||||
[% IF Koha.Preference('marcflavour') == 'UNIMARC' %]
|
||||
<li><label for="ean">EAN: </label> <input type="text" name="ean" id="ean" value="[% filters.ean | html %]" /></li>
|
||||
[% END %]
|
||||
|
|
|
|||
Loading…
Reference in New Issue