Bugzilla – Attachment 63157 Details for
Bug 18547
On shelf holds allowed > "If all unavailable" ignores default hold policy
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18547 - On shelf holds allowed > "If all unavailable" ignores default hold policy
Bug-18547---On-shelf-holds-allowed--If-all-unavail.patch (text/plain), 2.24 KB, created by
Mirko Tietgen
on 2017-05-05 07:55:47 UTC
(
hide
)
Description:
Bug 18547 - On shelf holds allowed > "If all unavailable" ignores default hold policy
Filename:
MIME Type:
Creator:
Mirko Tietgen
Created:
2017-05-05 07:55:47 UTC
Size:
2.24 KB
patch
obsolete
>From 0ebb3ebb7cdebefea9b10c427422a6bc3be27520 Mon Sep 17 00:00:00 2001 >From: Mirko Tietgen <mirko@abunchofthings.net> >Date: Wed, 3 May 2017 21:13:49 +0200 >Subject: [PATCH] Bug 18547 - On shelf holds allowed > "If all unavailable" > ignores default hold policy > >If in the circ rules matrix you set "On shelf holds allowed" to "If all unavailable", >default hold policy "From home library" is ignored. > >Test plan: > >- Have a test user from one branch (eg Centerville) > >- Set "On shelf holds allowed" to "If all unavailable" for your patron and item > category (or everyone and everything) >- For "Default checkout, hold and return policy", set hold policy to "From home library" > -> make sure there is no "Default holds policy by item type" to override the setting > >- Have two items for a record. > 1. An item with home branch same as test user (eg Centerville) > -> check this item out to somebody else > 2. an item with a different home branch (eg Fairfield) > -> available, not checked out >- Try to place a hold for your test user. Does not work. > >- Apply the patch >- Try to place a hold. Should work now. >--- > C4/Reserves.pm | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > >diff --git a/C4/Reserves.pm b/C4/Reserves.pm >index 3192d50..d9c7da0 100644 >--- a/C4/Reserves.pm >+++ b/C4/Reserves.pm >@@ -1413,6 +1413,10 @@ sub IsAvailableForItemLevelRequest { > my $any_available = 0; > > foreach my $i (@items) { >+ >+ my $circ_control_branch = C4::Circulation::_GetCircControlBranch( $i->unblessed(), $borrower ); >+ my $branchitemrule = C4::Circulation::GetBranchItemRule( $circ_control_branch, $i->itype ); >+ > $any_available = 1 > unless $i->itemlost > || $i->notforloan > 0 >@@ -1421,7 +1425,8 @@ sub IsAvailableForItemLevelRequest { > || IsItemOnHoldAndFound( $i->id ) > || ( $i->damaged > && !C4::Context->preference('AllowHoldsOnDamagedItems') ) >- || Koha::ItemTypes->find( $i->effective_itemtype() )->notforloan; >+ || Koha::ItemTypes->find( $i->effective_itemtype() )->notforloan >+ || $branchitemrule->{holdallowed} == 1 && $borrower->{branchcode} ne $i->homebranch; > } > > return $any_available ? 0 : 1; >-- >2.1.4
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 18547
:
63157
|
63227
|
66675
|
68854
|
69125
|
69126
|
69127