Bug 13949 - Item search should have holding library
authorOwen Leonard <oleonard@myacpl.org>
Mon, 15 Aug 2016 18:54:16 +0000 (14:54 -0400)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 9 Sep 2016 14:15:55 +0000 (14:15 +0000)
This patch adds holding library ("current location") to the list of
fields available in the item search form.

To test, apply the patch and go to Search -> Item search.

- Perform a search using the "current location" option and verify that
  it returns the correct results.
- Try other searches to confirm that they work as before.

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

catalogue/itemsearch.pl
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt

index 21ee163..3a5f0d9 100755 (executable)
@@ -101,7 +101,7 @@ if (scalar keys %params > 0) {
         filters => [],
     };
 
-    foreach my $p (qw(homebranch location itype ccode issues datelastborrowed notforloan)) {
+    foreach my $p (qw(homebranch holdingbranch location itype ccode issues datelastborrowed notforloan)) {
         if (my @q = $cgi->multi_param($p)) {
             if ($q[0] ne '') {
                 my $f = {
index e52780e..55f553e 100644 (file)
@@ -14,6 +14,7 @@
     [% CASE 'isbn' %]<span>ISBN</span>
     [% CASE 'issn' %]<span>ISSN</span>
     [% CASE 'homebranch' %]<span>Home library</span>
+    [% CASE 'holdingbranch' %]<span>Current location</span>
     [% CASE 'All libraries' %]<span>All libraries</span>
     [% CASE 'location' %]<span>Shelving location</span>
     [% CASE 'All locations' %]<span>All locations</span>
               empty_option = "All libraries"
             %]
             [% INCLUDE form_field_select
+              name="holdingbranch"
+              options = branches
+              empty_option = "All libraries"
+            %]
+            [% INCLUDE form_field_select
               name="location"
               options = locations
               empty_option = "All locations"