Bugzilla – Attachment 75686 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), 1.98 KB, created by
Jonathan Druart
on 2018-05-30 17:43:43 UTC
(
hide
)
Description:
Bug 20838: (bug 16735 follow-up) Fix search by group of libraries
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2018-05-30 17:43:43 UTC
Size:
1.98 KB
patch
obsolete
>From 030693740a5703eba4ca8ef44ef523fa340b5b42 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 > >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 >--- > 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 27b36b7802..6fc96d638f 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 f89e521665..1d7615bc5c 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.11.0
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