Bugzilla – Attachment 133870 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.52 KB, created by
Slava Shishkin
on 2022-04-26 09:57:00 UTC
(
hide
)
Description:
Bug 28269: Add feature to search Acquisitions Orders by ISSN
Filename:
MIME Type:
Creator:
Slava Shishkin
Created:
2022-04-26 09:57:00 UTC
Size:
3.52 KB
patch
obsolete
>From 77ab2dcb9516c79a33e50838f0e902095c7ac3a2 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 >--- > 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 76b6e647c6..d5bc67f884 100644 >--- a/C4/Acquisition.pm >+++ b/C4/Acquisition.pm >@@ -2083,6 +2083,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}; >@@ -2124,6 +2125,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 >@@ -2202,6 +2217,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.35.1
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