Bugzilla – Attachment 148436 Details for
Bug 33224
OPACHoldsIfAvailableAtPickup and no on-shelf holds don't mix well
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33224: OPACHoldsIfAvailableAtPickup and no on-shelf holds don't mix well
Bug-33224-OPACHoldsIfAvailableAtPickup-and-no-on-s.patch (text/plain), 3.06 KB, created by
Hammat wele
on 2023-03-20 21:46:40 UTC
(
hide
)
Description:
Bug 33224: OPACHoldsIfAvailableAtPickup and no on-shelf holds don't mix well
Filename:
MIME Type:
Creator:
Hammat wele
Created:
2023-03-20 21:46:40 UTC
Size:
3.06 KB
patch
obsolete
>From 81dae9c16bdcdb451114512e9b2b1e535446dc39 Mon Sep 17 00:00:00 2001 >From: Hammat Wele <hammat.wele@inlibro.com> >Date: Mon, 20 Mar 2023 21:44:10 +0000 >Subject: [PATCH] Bug 33224: OPACHoldsIfAvailableAtPickup and no on-shelf holds > don't mix well > >When OPACHoldsIfAvailableAtPickup preference is set to Don't allow and circulation rules allow on-shelf holds only if any unavailable, and we have a record with a checked out copy at Centerville and an available copy at Midway, a Midway patron should not be able to place a hold for pickup at Midway since the Midway copy is available. > >This is the setting: >- circulation rules allow on-shelf holds only if any unavailable >- OPACHoldsIfAvailableAtPickup is set to Don't allow > >To test: >1. Set up the circulation rule so that on-shelf holds are allowed ('Yes') >2. Create a record with two items, one at Centerville and one at Midway >3. Check out the Centerville item >4. Log into the OPAC with a Midway patron (I used Henry Acevedo) >5. Try to place a hold on the record > --> Midway is not a valid pickup location (correct behaviour) >6. Cancel >7. Change the circulation rules so that on-shelf holds are only allowed 'if any unavailable' >8. Try to place a hold on the record from the OPAC again > --> The system allows you to place the hold for pickup at Midway (incorrect behaviour) >9. Optionally, check the Holds to pull for Midway (the hold is there, it shouldn't) >10. Optionnaly, check in the Midway item (it is trapped for Henry's hold) >11. Apply the patch >12. Try again to place a hold on the record from the OPAC > --> it is impossible to select Midway, Midway is not a valid pickup location >--- > opac/opac-reserve.pl | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > >diff --git a/opac/opac-reserve.pl b/opac/opac-reserve.pl >index 07440efa6a..3f6f2a2c5f 100755 >--- a/opac/opac-reserve.pl >+++ b/opac/opac-reserve.pl >@@ -480,13 +480,13 @@ foreach my $biblioNum (@biblionumbers) { > $biblioLoopIter{force_hold} = 1 if $opac_hold_policy eq 'F'; > } > $numCopiesAvailable++; >+ } > >- unless ( $can_place_hold_if_available_at_pickup ) { >- my $items_in_this_library = Koha::Items->search({ biblionumber => $item->biblionumber, holdingbranch => $item->holdingbranch }); >- my $nb_of_items_issued = $items_in_this_library->search({ 'issue.itemnumber' => { not => undef }}, { join => 'issue' })->count; >- if ( $items_in_this_library->count > $nb_of_items_issued ) { >- push @not_available_at, $item->holdingbranch; >- } >+ unless ( $can_place_hold_if_available_at_pickup ) { >+ my $items_in_this_library = Koha::Items->search({ biblionumber => $item->biblionumber, holdingbranch => $item->holdingbranch }); >+ my $nb_of_items_issued = $items_in_this_library->search({ 'issue.itemnumber' => { not => undef }}, { join => 'issue' })->count; >+ if ( $items_in_this_library->count > $nb_of_items_issued ) { >+ push @not_available_at, $item->holdingbranch; > } > } > >-- >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 33224
:
148436
|
158143
|
176305