Bugzilla – Attachment 89723 Details for
Bug 20985
CanBookBeReserved and CanItemBeReserved should check 'On shelf holds allowed' policy
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20985 : Add OnShelfHoldsAllowed checks to CanItemBeReserved
Bug-20985--Add-OnShelfHoldsAllowed-checks-to-CanIt.patch (text/plain), 1.89 KB, created by
Arthur Suzuki
on 2019-05-13 23:11:10 UTC
(
hide
)
Description:
Bug 20985 : Add OnShelfHoldsAllowed checks to CanItemBeReserved
Filename:
MIME Type:
Creator:
Arthur Suzuki
Created:
2019-05-13 23:11:10 UTC
Size:
1.89 KB
patch
obsolete
>From 5695f8aa1ec39b782b13a9d8c64c8f6a35f528bd Mon Sep 17 00:00:00 2001 >From: Arthur Suzuki <arthur.suzuki@biblibre.com> >Date: Thu, 21 Mar 2019 21:52:06 +0100 >Subject: [PATCH] Bug 20985 : Add OnShelfHoldsAllowed checks to > CanItemBeReserved > >Test plan : >1 / Check that default circulation have OnShelfHoldsAllowed to Yes >2 / Place a hold on a book with a single item, item being available for loan, verify that hold can be placed. >3 / Set OnShelfHoldsAllowed to any other value, verify that hold cannot be placed for reason "onShelfHoldsNotAllowed" (shown in the item table). >--- > C4/Reserves.pm | 6 ++++++ > 1 file changed, 6 insertions(+) > >diff --git a/C4/Reserves.pm b/C4/Reserves.pm >index 5fc68f1359..8648c5b5e6 100644 >--- a/C4/Reserves.pm >+++ b/C4/Reserves.pm >@@ -295,6 +295,7 @@ sub CanBookBeReserved{ > if ($canReserve->{status} eq 'OK') { #We can reserve this Item! } > > @RETURNS { status => OK }, if the Item can be reserved. >+ { status => onShelfHoldsNotAllowed }, if onShelfHoldsAllowed parameter and item availability combination doesn't allow holds. > { status => ageRestricted }, if the Item is age restricted for this borrower. > { status => damaged }, if the Item is damaged. > { status => cannotReserveFromOtherBranches }, if syspref 'canreservefromotherbranches' is OK. >@@ -327,6 +328,11 @@ sub CanItemBeReserved { > if ( $item->damaged > && !C4::Context->preference('AllowHoldsOnDamagedItems') ); > >+ # Check for item on shelves and OnShelfHoldsAllowed >+ my $on_shelf_holds = Koha::IssuingRules->get_onshelfholds_policy( { item => $item, patron => $patron } ); >+ return { status => 'onShelfHoldsNotAllowed' } >+ unless ( $on_shelf_holds ); >+ > # Check for the age restriction > my ( $ageRestriction, $daysToAgeRestriction ) = > C4::Circulation::GetAgeRestriction( $biblio->biblioitem->agerestriction, $borrower ); >-- >2.11.0
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 20985
:
86874
|
89723
|
105991
|
110095
|
111954
|
112688
|
113730
|
113731
|
114801
|
114802
|
114804
|
114805
|
115732
|
115733
|
121100
|
121101
|
121102
|
121139
|
121176
|
121185
|
121186
|
121485
|
121486
|
154711