From a9c6558f96665b529996b09ad4885cbfabac6d0d Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 2 Sep 2021 09:48:44 +0200 Subject: [PATCH] Bug 28919: Select logged in library as pickup for multi holds When placing multiple holds from the result list, the pick-up location is empty now, which makes it a more tedious process than it needs to be. Logged in library must be selected to match the single hold logic. Signed-off-by: Owen Leonard Signed-off-by: Katrin Fischer --- koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc | 2 +- koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt | 8 +++----- reserve/request.pl | 6 +++--- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc index 86eab2547f..b257619adc 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc @@ -1,6 +1,6 @@ [% BLOCK options_for_libraries %] [% FOREACH l IN libraries %] - [% IF l.selected %] + [% IF l.branchcode == selected OR l.selected %] [% ELSE %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt index 14cc35a319..4f1f9d18c6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt @@ -465,14 +465,12 @@ [% UNLESS ( multi_hold ) %] [% ELSE %] + [% END %] [% UNLESS ( multi_hold ) %] diff --git a/reserve/request.pl b/reserve/request.pl index 95a7fd43d1..c251ecf15d 100755 --- a/reserve/request.pl +++ b/reserve/request.pl @@ -307,10 +307,10 @@ $template->param( my $patron = Koha::Patrons->find( $borrowernumber_hold ); if ( $patron && $multi_hold ) { - my @multi_pickup_locations = + my $multi_pickup_locations = Koha::Biblios->search( { biblionumber => \@biblionumbers } ) - ->pickup_locations( { patron => $patron } ); - $template->param( multi_pickup_locations => \@multi_pickup_locations ); + ->pickup_locations( { patron => $patron } )->unblessed; + $template->param( multi_pickup_locations => $multi_pickup_locations ); } my $logged_in_patron = Koha::Patrons->find( $borrowernumber ); -- 2.11.0