Bugzilla – Attachment 144429 Details for
Bug 30556
OPAC shows "Place hold" button on available items even if on shelf holds aren't allowed
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30556: Changing the logged-in user's branch by pick-up location
Bug-30556-Changing-the-logged-in-users-branch-by-p.patch (text/plain), 3.38 KB, created by
Hammat wele
on 2022-12-05 17:39:18 UTC
(
hide
)
Description:
Bug 30556: Changing the logged-in user's branch by pick-up location
Filename:
MIME Type:
Creator:
Hammat wele
Created:
2022-12-05 17:39:18 UTC
Size:
3.38 KB
patch
obsolete
>From b44ca1d15ad4524a2a4c433b2d5c7666eb6e0d7f Mon Sep 17 00:00:00 2001 >From: Hammat Wele <hammat.wele@inlibro.com> >Date: Mon, 5 Dec 2022 17:36:42 +0000 >Subject: [PATCH] Bug 30556: Changing the logged-in user's branch by pick-up > location > >--- > opac/opac-ISBDdetail.pl | 11 ++++++++++- > opac/opac-MARCdetail.pl | 11 ++++++++++- > opac/opac-detail.pl | 11 ++++++++++- > 3 files changed, 30 insertions(+), 3 deletions(-) > >diff --git a/opac/opac-ISBDdetail.pl b/opac/opac-ISBDdetail.pl >index 3f9446583a..8f8844cabb 100755 >--- a/opac/opac-ISBDdetail.pl >+++ b/opac/opac-ISBDdetail.pl >@@ -179,7 +179,16 @@ my $res = GetISBDView({ > my $items = $biblio->items; > while ( my $item = $items->next ) { > >- $is_available = IsAvailableForItemLevelRequest($item, $patron, $currentbranch) >+ my $default_hold_pickup_location_pref = C4::Context->preference('DefaultHoldPickupLocation'); >+ my $pickup_branch; >+ if( $default_hold_pickup_location_pref eq 'homebranch' ){ >+ $pickup_branch = $item->{homebranch} ? $item->{homebranch} : undef; >+ } elsif ( $default_hold_pickup_location_pref eq 'holdingbranch' ){ >+ $pickup_branch = $item->{holdingbranch} ? $item->{holdingbranch} : undef; >+ } else { >+ $pickup_branch = $currentbranch; >+ } >+ $is_available = IsAvailableForItemLevelRequest($item, $patron, $pickup_branch) > unless $is_available; > } > >diff --git a/opac/opac-MARCdetail.pl b/opac/opac-MARCdetail.pl >index 353d250948..b7bcae8af0 100755 >--- a/opac/opac-MARCdetail.pl >+++ b/opac/opac-MARCdetail.pl >@@ -144,7 +144,16 @@ my $is_available; > my $items = $biblio->items; > > while ( my $item = $items->next ) { >- $is_available = IsAvailableForItemLevelRequest($item, $patron, $currentbranch) >+ my $default_hold_pickup_location_pref = C4::Context->preference('DefaultHoldPickupLocation'); >+ my $pickup_branch; >+ if( $default_hold_pickup_location_pref eq 'homebranch' ){ >+ $pickup_branch = $item->{homebranch} ? $item->{homebranch} : undef; >+ } elsif ( $default_hold_pickup_location_pref eq 'holdingbranch' ){ >+ $pickup_branch = $item->{holdingbranch} ? $item->{holdingbranch} : undef; >+ } else { >+ $pickup_branch = $currentbranch; >+ } >+ $is_available = IsAvailableForItemLevelRequest($item, $patron, $pickup_branch) > unless $is_available; > } > >diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl >index ffa2a19812..6d91b0da14 100755 >--- a/opac/opac-detail.pl >+++ b/opac/opac-detail.pl >@@ -686,7 +686,16 @@ else { > $item_info->{holding_library_info} = $opac_info_holding->content if $opac_info_holding; > $item_info->{home_library_info} = $opac_info_home->content if $opac_info_home; > >- $is_available = IsAvailableForItemLevelRequest($item, $patron, $currentbranch) >+ my $default_hold_pickup_location_pref = C4::Context->preference('DefaultHoldPickupLocation'); >+ my $pickup_branch; >+ if( $default_hold_pickup_location_pref eq 'homebranch' ){ >+ $pickup_branch = $item->homebranch ? $item->homebranch : undef; >+ } elsif ( $default_hold_pickup_location_pref eq 'holdingbranch' ){ >+ $pickup_branch = $item->holdingbranch ? $item->holdingbranch : undef; >+ } else { >+ $pickup_branch = $currentbranch; >+ } >+ $is_available = IsAvailableForItemLevelRequest($item, $patron, $pickup_branch) > unless $is_available; > > # get collection code description, too >-- >2.34.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 30556
:
133497
|
133608
|
134172
|
134420
|
134421
|
134436
|
134437
|
134438
|
134617
|
134619
|
134620
|
134621
|
135395
|
137065
|
139289
|
139290
|
139291
|
139292
|
144429
|
147378
|
147379
|
147380
|
147381
|
147382
|
147441
|
147442
|
150218
|
150219
|
150220
|
150221
|
150222
|
156188
|
156189
|
156190
|
156191
|
156192
|
156429
|
157087
|
157088
|
157089
|
157090
|
157091