Bugzilla – Attachment 121615 Details for
Bug 28503
When ReservesControlBranch = "patron's home library" and Hold policy = "From home library" all holds are allowed
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28503: Compare item homebranch to patron branch when hold policy set to 'from_home_library'
Bug-28503-Compare-item-homebranch-to-patron-branch.patch (text/plain), 2.65 KB, created by
David Nind
on 2021-06-03 22:58:36 UTC
(
hide
)
Description:
Bug 28503: Compare item homebranch to patron branch when hold policy set to 'from_home_library'
Filename:
MIME Type:
Creator:
David Nind
Created:
2021-06-03 22:58:36 UTC
Size:
2.65 KB
patch
obsolete
>From d2d64ceb4de4ea293c99763419b88bb97a22ff66 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Wed, 2 Jun 2021 15:20:08 +0000 >Subject: [PATCH] Bug 28503: Compare item homebranch to patron branch when hold > policy set to 'from_home_library' > >This fixes an issue in the way we calculate the check for hold policy 'from_home_library' > >Currently we change the comparison based on ReservesControlBranch, however, that should >only control the rule we fetch, not how we compare > >When ReservesControlBranch is set to "patron's home library" we compare the patron's branch to >the patron's branch, this is useless and means we pass the check for all branches all of the time > >We should instead compare the patron's branch to the item's branch, and only fetch the rule using ReservesControlBranch > >To test: > 1 - Have a record with an item from library A and library B > 2 - Set the 'Default checkout, hold and return policy'->Hold policy->From home library for all libraries > and ensure you have no branch specific/itemtype specific rules set > 3 - Attempt to place a hold on the record for a patron from library B > 4 - Note that only the library B item is holdable - place a title level hold (do not choose an item) > 5 - Check in the item from library A > 6 - It fills the hold - This is incorrect - ignore the hold > 7 - Apply patch > 8 - Restart all the things > 9 - Check in the item from library A >10 - No hold found >11 - Check in the item from library B >12 - Hold found, correctly > >Signed-off-by: David Nind <david@davidnind.com> >--- > C4/Reserves.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/C4/Reserves.pm b/C4/Reserves.pm >index 8941d4f72c..0bf8bf6b77 100644 >--- a/C4/Reserves.pm >+++ b/C4/Reserves.pm >@@ -902,7 +902,7 @@ sub CheckReserves { > my $branch = GetReservesControlBranch( $item->unblessed, $patron->unblessed ); > my $branchitemrule = C4::Circulation::GetBranchItemRule($branch,$item->effective_itemtype); > next if ($branchitemrule->{'holdallowed'} eq 'not_allowed'); >- next if (($branchitemrule->{'holdallowed'} eq 'from_home_library') && ($branch ne $patron->branchcode)); >+ next if (($branchitemrule->{'holdallowed'} eq 'from_home_library') && ($item->homebranch ne $patron->branchcode)); > my $library = Koha::Libraries->find({branchcode=>$item->homebranch}); > next if (($branchitemrule->{'holdallowed'} eq 'from_local_hold_group') && (!$library->validate_hold_sibling({branchcode => $patron->branchcode}) )); > my $hold_fulfillment_policy = $branchitemrule->{hold_fulfillment_policy}; >-- >2.20.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 28503
:
121542
|
121543
|
121544
|
121614
|
121615
|
121616
|
121991
|
121992
|
121993
|
121994
|
122282