Bugzilla – Attachment 113007 Details for
Bug 26132
Improve readability of TooMany
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26132: (follow-up) Fix broken code in TooMany function
Bug-26132-follow-up-Fix-broken-code-in-TooMany-fun.patch (text/plain), 1.46 KB, created by
Joonas Kylmälä
on 2020-11-04 15:11:07 UTC
(
hide
)
Description:
Bug 26132: (follow-up) Fix broken code in TooMany function
Filename:
MIME Type:
Creator:
Joonas Kylmälä
Created:
2020-11-04 15:11:07 UTC
Size:
1.46 KB
patch
obsolete
>From c8c1b99612bedada7b13b15eadf4972b823a5818 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Joonas=20Kylm=C3=A4l=C3=A4?= <joonas.kylmala@helsinki.fi> >Date: Wed, 4 Nov 2020 17:05:28 +0200 >Subject: [PATCH] Bug 26132: (follow-up) Fix broken code in TooMany function > >The $checkouts variable was not defined in the PatronLibrary case at >all and in the else case the SQL join was totally missing. > >To test: >1) Without this patch notice prove > t/db_dependent/Circulation/TooMany.t fails >2) With this patch notice prove > t/db_dependent/Circulation/TooMany.t succeeds >--- > C4/Circulation.pm | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index c66d5d5e52..6880a8288c 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -543,10 +543,11 @@ sub TooMany { > $checkouts = $patron->checkouts->search( > { 'me.branchcode' => $branch} ); > } elsif (C4::Context->preference('CircControl') eq 'PatronLibrary') { >- ; # if branch is the patron's home branch, then count all loans by patron >+ $checkouts = $patron->checkouts; # if branch is the patron's home branch, then count all loans by patron > } else { > $checkouts = $patron->checkouts->search( >- { 'item.homebranch' => $branch} ); >+ { 'item.homebranch' => $branch}, >+ { prefetch => 'item' } ); > } > > my $checkout_count = $checkouts->count; >-- >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 26132
:
107734
|
107735
|
107736
|
107737
|
107738
|
107796
|
107797
|
107798
|
107799
|
107800
|
107801
|
108147
|
108148
|
108149
|
108150
|
108151
|
108152
|
108153
|
113006
| 113007 |
113014
|
113034