Bug 33198: Don't calculate pickup locations per bib unless placing multiple holds
authorNick Clemens <nick@bywatersolutions.com>
Fri, 10 Mar 2023 18:44:21 +0000 (18:44 +0000)
committerTomas Cohen Arazi <tomascohen@theke.io>
Mon, 27 Mar 2023 09:50:18 +0000 (11:50 +0200)
For single bibs we use an ajax select2 dropdown, and we don't use this
value

To test:
1 - Place some holds on single bibs
2 - Confirm dropdowns for pickup location work as expected
3 - Do the same for multiple bibs selected from search results
4 - Apply patch
5 - Confirm there is no change after the patch

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
reserve/request.pl

index 0c37d6e..fce3a6e 100755 (executable)
@@ -681,7 +681,7 @@ if (   ( $findborrower && $borrowernumber_hold || $findclub && $club_hold )
             $template->param( reserveloop => \@reserveloop );
         }
 
-        if ( $patron ) {
+        if ( $patron && $multi_hold ) {
             # Add the valid pickup locations
             my @pickup_locations = $biblio->pickup_locations({ patron => $patron })->as_list;
             $biblioloopiter{pickup_locations} = \@pickup_locations;