Bug 28118: Default to current branch when placing hold
During bug 27071 development, this line got inadvertedly changed. This patch restores the original behaviour. To test: 1. Search for a title 2. Go try place a hold => FAIL: Look at the HTML, there's no pickup location with selected="selected" 3. Switch branch and repeat 2 => FAIL: Still the same 4. Apply this patch 5. Repeat 2 and 3 => SUCCESS: Branch is selected, chosen current branch is picked 6. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
4e8c014f7a
commit
a7529e1fd9
|
|
@ -551,7 +551,7 @@ foreach my $biblionumber (@biblionumbers) {
|
|||
|
||||
$item->{'holdallowed'} = $branchitemrule->{'holdallowed'};
|
||||
|
||||
my $reserves_control_branch = $pickup // C4::Reserves::GetReservesControlBranch( $item, $patron_unblessed );
|
||||
my $reserves_control_branch = $pickup || C4::Reserves::GetReservesControlBranch( $item, $patron_unblessed );
|
||||
my $can_item_be_reserved = CanItemBeReserved( $patron->borrowernumber, $itemnumber, $reserves_control_branch )->{status};
|
||||
$item->{not_holdable} = $can_item_be_reserved unless ( $can_item_be_reserved eq 'OK' );
|
||||
|
||||
|
|
@ -732,7 +732,9 @@ $template->param( biblionumbers => $biblionumbers );
|
|||
$template->param( exceeded_maxreserves => $exceeded_maxreserves );
|
||||
$template->param( exceeded_holds_per_record => $exceeded_holds_per_record );
|
||||
$template->param( subscriptionsnumber => CountSubscriptionFromBiblionumber($biblionumber));
|
||||
$template->param( pickup => $pickup );
|
||||
|
||||
# pass the userenv branch if no pickup location selected
|
||||
$template->param( pickup => $pickup || C4::Context->userenv->{branch} );
|
||||
|
||||
if ( C4::Context->preference( 'AllowHoldDateInFuture' ) ) {
|
||||
$template->param( reserve_in_future => 1 );
|
||||
|
|
|
|||
Loading…
Reference in New Issue