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>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
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 '()');
}
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 '()');
}