Bug 24506: Multibranch limit does not work with ElasticSearch
Test plan 1. Set up a system with ElasticSearch 2. Set up or make sure ther are at least two branches 3. create a group of branches 4. make sure there are items associated with any library in the group 5. make a search in opac limited by the library group 6. make an advanced search in intra limited by the library group 7. change SearchEngine system preference to Zebra and repeat 5. and 6. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
parent
6fcbf109d6
commit
932596cc47
2 changed files with 2 additions and 2 deletions
|
@ -423,7 +423,7 @@ my %is_nolimit = map { $_ => 1 } @nolimits;
|
||||||
if($params->{'multibranchlimit'}) {
|
if($params->{'multibranchlimit'}) {
|
||||||
my $search_group = Koha::Library::Groups->find( $params->{multibranchlimit} );
|
my $search_group = Koha::Library::Groups->find( $params->{multibranchlimit} );
|
||||||
my @libraries = $search_group->all_libraries;
|
my @libraries = $search_group->all_libraries;
|
||||||
my $multibranch = '('.join( " or ", map { 'branch: ' . $_->branchcode } @libraries ) .')';
|
my $multibranch = '('.join( " OR ", map { '(homebranch: ' . $_->branchcode .')' } @libraries ) .')';
|
||||||
push @limits, $multibranch if ($multibranch ne '()');
|
push @limits, $multibranch if ($multibranch ne '()');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -504,7 +504,7 @@ if (@searchCategories > 0) {
|
||||||
if($params->{'multibranchlimit'}) {
|
if($params->{'multibranchlimit'}) {
|
||||||
my $search_group = Koha::Library::Groups->find( $params->{multibranchlimit} );
|
my $search_group = Koha::Library::Groups->find( $params->{multibranchlimit} );
|
||||||
my @libraries = $search_group->all_libraries;
|
my @libraries = $search_group->all_libraries;
|
||||||
my $multibranch = '('.join( " or ", map { 'branch: ' . $_->branchcode } @libraries ) .')';
|
my $multibranch = '('.join( " OR ", map { 'homebranch: ' . $_->branchcode } @libraries ) .')';
|
||||||
push @limits, $multibranch if ($multibranch ne '()');
|
push @limits, $multibranch if ($multibranch ne '()');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue