Bugzilla – Attachment 138850 Details for
Bug 28269
Order search should be possible with ISSN too
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28269: Add feature to search Acquisitions Orders by ISSN
Bug-28269-Add-feature-to-search-Acquisitions-Order.patch (text/plain), 3.63 KB, created by
Katrin Fischer
on 2022-08-08 19:30:06 UTC
(
hide
)
Description:
Bug 28269: Add feature to search Acquisitions Orders by ISSN
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2022-08-08 19:30:06 UTC
Size:
3.63 KB
patch
obsolete
>From e06d3ecfe556b4296d657ee0e72153bf9a1cf5ea Mon Sep 17 00:00:00 2001 >From: Slava Shishkin <slavashishkin@gmail.com> >Date: Sun, 24 Apr 2022 00:51:00 +0300 >Subject: [PATCH] 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> >--- > C4/Acquisition.pm | 22 +++++++++++++++++++ > acqui/histsearch.pl | 1 + > .../prog/en/includes/filter-orders.inc | 1 + > 3 files changed, 24 insertions(+) > >diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm >index bf8a215573..cd2df080f3 100644 >--- a/C4/Acquisition.pm >+++ b/C4/Acquisition.pm >@@ -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"; >diff --git a/acqui/histsearch.pl b/acqui/histsearch.pl >index e1bdb3851f..ff00c28442 100755 >--- a/acqui/histsearch.pl >+++ b/acqui/histsearch.pl >@@ -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'), >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/filter-orders.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/filter-orders.inc >index 2ba0802684..84db77943d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/filter-orders.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/filter-orders.inc >@@ -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 %] >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 28269
:
133782
|
133796
|
133869
|
133870
|
133871
|
134386
|
134387
|
134427
|
134428
|
138185
|
138186
| 138850 |
138851
|
138852