Bugzilla – Attachment 97513 Details for
Bug 24441
Error when checking in an item with BranchTansferLimitsType set to itemtype
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24441: Error when checking in an item with BranchTansferLimitsType set to itemtype
Bug-24441-Error-when-checking-in-an-item-with-Bran.patch (text/plain), 1.85 KB, created by
Kyle M Hall (khall)
on 2020-01-17 12:09:02 UTC
(
hide
)
Description:
Bug 24441: Error when checking in an item with BranchTansferLimitsType set to itemtype
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2020-01-17 12:09:02 UTC
Size:
1.85 KB
patch
obsolete
>From 4516fabab42a93126f16b01989c0038a86a87587 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Thu, 16 Jan 2020 14:10:18 -0500 >Subject: [PATCH] Bug 24441: Error when checking in an item with > BranchTansferLimitsType set to itemtype > >It appears that the transition to using Koha::Item in AddReturn has introduced a bug. Previously $item was a hashref with the key 'itemtype', now that it's an object, it has no itemtype method and so triggers an error with the message "The method Koha::Item->itemtype is not covered by tests!". > >Test Plan: >1) Enable Branch Transfer Limits via itemtype >2) Check in an item >3) Note the error >4) Apply this patch >5) Restart all the things! >6) Check in an item >7) No error! > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> > >Signed-off-by: Maribeth (Turner) Shafer - Central Kansas Library System CKLS <mshafer@ckls.org> >--- > C4/Circulation.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index c3629c2472..e58aa2c983 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -2111,7 +2111,7 @@ sub AddReturn { > > # Transfer to returnbranch if Automatic transfer set or append message NeedsTransfer > if (!$is_in_rotating_collection && ($doreturn or $messages->{'NotIssued'}) and !$resfound and ($branch ne $returnbranch) and not $messages->{'WrongTransfer'}){ >- my $BranchTransferLimitsType = C4::Context->preference("BranchTransferLimitsType"); >+ my $BranchTransferLimitsType = C4::Context->preference("BranchTransferLimitsType") eq 'itemtype' ? 'effective_itemtype' : 'ccode'; > if (C4::Context->preference("AutomaticItemReturn" ) or > (C4::Context->preference("UseBranchTransferLimits") and > ! IsBranchTransferAllowed($branch, $returnbranch, $item->$BranchTransferLimitsType ) >-- >2.21.1 (Apple Git-122.3)
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 24441
:
97469
|
97513
|
97669
|
97670