Bugzilla – Attachment 131049 Details for
Bug 30168
Use checkout object in GetSoonestRenewDate
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30168: Embed patron and item in issue for passing to GetSoonestRenewDate
Bug-30168-Embed-patron-and-item-in-issue-for-passi.patch (text/plain), 1.06 KB, created by
Nick Clemens (kidclamp)
on 2022-02-23 16:53:02 UTC
(
hide
)
Description:
Bug 30168: Embed patron and item in issue for passing to GetSoonestRenewDate
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2022-02-23 16:53:02 UTC
Size:
1.06 KB
patch
obsolete
>From 3896c6e8db39b115bb61284e8b4b14cefc9c1728 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Wed, 23 Feb 2022 16:28:58 +0000 >Subject: [PATCH] Bug 30168: Embed patron and item in issue for passing to > GetSoonestRenewDate > >--- > C4/Circulation.pm | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index 26e176d99c..2108b5e340 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -2753,8 +2753,8 @@ sub CanBookBeRenewed { > my $auto_renew = "no"; > my $soonest; > >- my $item = Koha::Items->find($itemnumber) or return ( 0, 'no_item' ); >- my $issue = $item->checkout or return ( 0, 'no_checkout' ); >+ my $issue = Koha::Checkouts->find({ itemnumber => $itemnumber }, { prefetch => ['borrowernumber','itemnumber'] }) or return ( 0, 'no_issue' ); >+ my $item = $issue->item or return ( 0, 'no_item' ); > return ( 0, 'onsite_checkout' ) if $issue->onsite_checkout; > return ( 0, 'item_denied_renewal') if _item_denied_renewal({ item => $item }); > >-- >2.30.2
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 30168
:
131048
|
131049
|
134603
|
140969
|
141554
|
141555