Bugzilla – Attachment 87024 Details for
Bug 20837
CanItemBeReserved should follow ReservesControlBranch and not CircControl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20837: Alter IsAvailableForItemForItemLevelRequest to use ReservesControlBranch
Bug-20837-Alter-IsAvailableForItemForItemLevelRequ.patch (text/plain), 1.67 KB, created by
Nick Clemens (kidclamp)
on 2019-03-26 14:52:24 UTC
(
hide
)
Description:
Bug 20837: Alter IsAvailableForItemForItemLevelRequest to use ReservesControlBranch
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2019-03-26 14:52:24 UTC
Size:
1.67 KB
patch
obsolete
>From 822af2bedd96c9cad60a9db74a496139f7882961 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Tue, 26 Mar 2019 13:56:04 +0000 >Subject: [PATCH] Bug 20837: Alter IsAvailableForItemForItemLevelRequest to use > ReservesControlBranch > >Also use Koha objects for fetching itemtype info > >To test: >Same test plan as above, ensure item availability is affected the the system preference >prove t/db_dependent/Holds/DisallowHoldIfItemsAvailable.t >--- > C4/Reserves.pm | 7 ++----- > 1 file changed, 2 insertions(+), 5 deletions(-) > >diff --git a/C4/Reserves.pm b/C4/Reserves.pm >index 3b210f5b31..e311c2b129 100644 >--- a/C4/Reserves.pm >+++ b/C4/Reserves.pm >@@ -1173,9 +1173,7 @@ sub IsAvailableForItemLevelRequest { > my $patron = Koha::Patrons->find( $borrower->{borrowernumber} ); > my $item_object = Koha::Items->find( $item->{itemnumber } ); > my $itemtype = $item_object->effective_itemtype; >- my $notforloan_per_itemtype >- = $dbh->selectrow_array("SELECT notforloan FROM itemtypes WHERE itemtype = ?", >- undef, $itemtype); >+ my $notforloan_per_itemtype = Koha::ItemTypes->find($itemtype)->notforloan; > > return 0 if > $notforloan_per_itemtype || >@@ -1202,8 +1200,7 @@ sub IsAvailableForItemLevelRequest { > my $any_available = 0; > > foreach my $i (@items) { >- >- my $circ_control_branch = C4::Circulation::_GetCircControlBranch( $i->unblessed(), $borrower ); >+ my $circ_control_branch = GetReservesControlBranch( $i->unblessed(), $borrower ); > my $branchitemrule = C4::Circulation::GetBranchItemRule( $circ_control_branch, $i->itype ); > > $any_available = 1 >-- >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 20837
:
75684
|
75685
|
87021
|
87022
|
87023
|
87024
|
87025
|
87409
|
87410
|
87673
|
87674
|
87675
|
88699
|
88700
|
88701