Bugzilla – Attachment 75731 Details for
Bug 20838
Search by group of libraries is broken
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20838: (bug 16735 follow-up) Fix search by group of libraries
Bug-20838-bug-16735-follow-up-Fix-search-by-group-.patch (text/plain), 2.11 KB, created by
Marcel de Rooy
on 2018-06-01 09:43:43 UTC
(
hide
)
Description:
Bug 20838: (bug 16735 follow-up) Fix search by group of libraries
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2018-06-01 09:43:43 UTC
Size:
2.11 KB
patch
obsolete
>From c9bcaf13c0ec162d25532cc58de2f50dc6e6796f Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 30 May 2018 14:41:14 -0300 >Subject: [PATCH] Bug 20838: (bug 16735 follow-up) Fix search by group of > libraries >Content-Type: text/plain; charset=utf-8 > >In the last patches of bug 16735, we completely broke the feature! > >The limit is using library_groups.id instead of branches.branchcode. > >Test plan: >Create a group of library with the search feature >Search (OPAC and staff interfaces) using this limit > >=> Without this patch you will see that the generated search query does >not contain branchcodes >=> With this patch applied you will see the branchcodes > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > catalogue/search.pl | 2 +- > opac/opac-search.pl | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > >diff --git a/catalogue/search.pl b/catalogue/search.pl >index 27b36b7..6fc96d6 100755 >--- a/catalogue/search.pl >+++ b/catalogue/search.pl >@@ -399,7 +399,7 @@ my %is_nolimit = map { $_ => 1 } @nolimits; > if($params->{'multibranchlimit'}) { > my $search_group = Koha::Library::Groups->find( $params->{multibranchlimit} ); > my @libraries = $search_group->all_libraries; >- my $multibranch = '('.join( " or ", map { 'branch: ' . $_->id } @libraries ) .')'; >+ my $multibranch = '('.join( " or ", map { 'branch: ' . $_->branchcode } @libraries ) .')'; > push @limits, $multibranch if ($multibranch ne '()'); > } > >diff --git a/opac/opac-search.pl b/opac/opac-search.pl >index f89e521..1d7615b 100755 >--- a/opac/opac-search.pl >+++ b/opac/opac-search.pl >@@ -493,7 +493,7 @@ if (@searchCategories > 0) { > if($params->{'multibranchlimit'}) { > my $search_group = Koha::Library::Groups->find( $params->{multibranchlimit} ); > my @libraries = $search_group->all_libraries; >- my $multibranch = '('.join( " or ", map { 'branch: ' . $_->id } @libraries ) .')'; >+ my $multibranch = '('.join( " or ", map { 'branch: ' . $_->branchcode } @libraries ) .')'; > push @limits, $multibranch if ($multibranch ne '()'); > } > >-- >2.1.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 20838
:
75686
|
75687
|
75700
|
75701
| 75731 |
75732
|
75739