Bugzilla – Attachment 47323 Details for
Bug 14875
Search serials by barcode
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14875 - Search serials by barcode
Bug-14875---Search-serials-by-barcode.patch (text/plain), 6.49 KB, created by
Nicole C. Engard
on 2016-01-26 22:45:13 UTC
(
hide
)
Description:
Bug 14875 - Search serials by barcode
Filename:
MIME Type:
Creator:
Nicole C. Engard
Created:
2016-01-26 22:45:13 UTC
Size:
6.49 KB
patch
obsolete
>From a01555a6c7ccfe4dc2d43d89473a52b1c99b6830 Mon Sep 17 00:00:00 2001 >From: Briana <brianagreally@gmail.com> >Date: Thu, 21 Jan 2016 01:53:25 +0000 >Subject: [PATCH] Bug 14875 - Search serials by barcode > >This patch is only for the advanced search >To test: > >1. Go to serials >2. If required make a new subscription and/or then click on advanced search >3. See that there is no barcode field. >4. Apply patch and repeat steps, there should now be a barcode field. >5. Type in a barcode and hit search. See that your book shows up. > >Signed-off-by: Nicole Engard <nengard@bywatersolutions.com> >--- > C4/Serials.pm | 8 ++++++++ > .../prog/en/modules/serials/serials-search.tt | 16 +++++++++++++++- > serials/serials-search.pl | 3 +++ > 3 files changed, 26 insertions(+), 1 deletion(-) > >diff --git a/C4/Serials.pm b/C4/Serials.pm >index c09a198..a5df230 100644 >--- a/C4/Serials.pm >+++ b/C4/Serials.pm >@@ -550,6 +550,7 @@ The valid search fields are: > callnumber > location > publisher >+ barcode > bookseller > branch > expiration_date >@@ -589,6 +590,7 @@ sub SearchSubscriptions { > LEFT JOIN biblio ON biblio.biblionumber = subscription.biblionumber > LEFT JOIN biblioitems ON biblioitems.biblionumber = subscription.biblionumber > LEFT JOIN aqbooksellers ON subscription.aqbooksellerid = aqbooksellers.id >+ LEFT JOIN items ON items.biblionumber = biblio.biblionumber > |; > $query .= q| WHERE 1|; > my @where_strs; >@@ -626,6 +628,12 @@ sub SearchSubscriptions { > push @where_strs, "biblioitems.publishercode LIKE ?"; > push @where_args, "%$args->{publisher}%"; > } >+ if( $args->{barcode} ){ >+ push @where_strs, "items.barcode LIKE ?"; >+ push @where_args, "%$args->{barcode}%"; >+ } >+ >+ > if( $args->{bookseller} ){ > push @where_strs, "aqbooksellers.name LIKE ?"; > push @where_args, "%$args->{bookseller}%"; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt >index be67cfa..6ade013 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt >@@ -81,6 +81,13 @@ > <label for="publisher">Publisher:</label> > <input type="text" id="publisher" name="publisher_filter" value="[% publisher_filter | html %]" /> > </li> >+ >+ <li> >+ <label for="barcode">Barcode:</label> >+ <input type="text" id="barcode" name="barcode_filter" value="[% barcode_filter | html %]" /> >+ </li> >+ >+ > <li> > <label for="bookseller">Vendor:</label> > <input type="text" id="bookseller" name="bookseller_filter" value="[% bookseller_filter | html %]" /> >@@ -338,7 +345,7 @@ > [% IF ( routing && CAN_user_serials_routing ) %] > [% UNLESS ( subscription.cannotedit ) %] > <li> >- <a href="/cgi-bin/koha/serials/serials-search.pl?subscriptionid=[% subscription.subscriptionid %]&op=reopen&routing=[% subscription.routing %]&searched=1&title_filter=[% title_filter | uri %]&ISSN_filter=[% ISSN_filter | uri %]&EAN_filter=[% EAN_filter | uri %]&published_filter=[% publisher_filter | uri %]&bookseller_filter=[% bookseller_filter | uri %]&branch_filter=[% branch_filter | uri %]" id="reopensub"> <i class="fa fa-repeat"></i> Reopen</a> >+ <a href="/cgi-bin/koha/serials/serials-search.pl?subscriptionid=[% subscription.subscriptionid %]&op=reopen&routing=[% subscription.routing %]&searched=1&title_filter=[% title_filter | uri %]&ISSN_filter=[% ISSN_filter | uri %]&EAN_filter=[% EAN_filter | uri %]&published_filter=[% publisher_filter | uri %]&barcode_filter=[% barcode_filter | uri %]&bookseller_filter=[% bookseller_filter | uri %]&branch_filter=[% branch_filter | uri %]" id="reopensub"> <i class="fa fa-repeat"></i> Reopen</a> > </li> > [% END %] > [% END # IF ( routing && CAN_user_serials_routing ) %] >@@ -401,6 +408,13 @@ > <label for="publisher">Publisher:</label> > <input type="text" id="publisher" name="publisher_filter" value="[% publisher_filter | html %]" /> > </li> >+ >+ <li> >+ <label for="barcode">Vendor:</label> >+ <input type="text" id="barcode" name="barcode_filter" value="[% barcode_filter | html %]" /> >+ </li> >+ >+ > <li> > <label for="bookseller">Vendor:</label> > <input type="text" id="bookseller" name="bookseller_filter" value="[% bookseller_filter | html %]" /> >diff --git a/serials/serials-search.pl b/serials/serials-search.pl >index 3e73c56..eb5ce8a 100755 >--- a/serials/serials-search.pl >+++ b/serials/serials-search.pl >@@ -46,6 +46,7 @@ my $ISSN = $query->param('ISSN_filter') || ''; > my $EAN = $query->param('EAN_filter') || ''; > my $callnumber = $query->param('callnumber_filter') || ''; > my $publisher = $query->param('publisher_filter') || ''; >+my $barcode = $query->param('barcode_filter') || ''; > my $bookseller = $query->param('bookseller_filter') || ''; > my $biblionumber = $query->param('biblionumber') || ''; > my $branch = $query->param('branch_filter') || ''; >@@ -104,6 +105,7 @@ if ($searched){ > ean => $EAN, > callnumber => $callnumber, > publisher => $publisher, >+ barcode => $barcode, > bookseller => $bookseller, > branch => $branch, > additional_fields => [ map{ { name => $_, value => $additional_field_filters->{$_}{value}, authorised_value_category => $additional_field_filters->{$_}{authorised_value_category} } } keys %$additional_field_filters ], >@@ -153,6 +155,7 @@ $template->param( > EAN_filter => $EAN, > callnumber_filter => $callnumber, > publisher_filter => $publisher, >+ barcode_filter => $barcode, > bookseller_filter => $bookseller, > branch_filter => $branch, > locations => C4::Koha::GetAuthorisedValues('LOC', $location), >-- >1.7.10.4
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 14875
:
47074
|
47077
| 47323 |
47324