Bugzilla – Attachment 113014 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: (GOLF EXAMPLE)
Bug-26132-GOLF-EXAMPLE.patch (text/plain), 1.97 KB, created by
Martin Renvoize (ashimema)
on 2020-11-04 16:53:07 UTC
(
hide
)
Description:
Bug 26132: (GOLF EXAMPLE)
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2020-11-04 16:53:07 UTC
Size:
1.97 KB
patch
obsolete
>From 78062cb4e833748c03dcec72381775318adf7b18 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Wed, 4 Nov 2020 16:52:14 +0000 >Subject: [PATCH] Bug 26132: (GOLF EXAMPLE) > >--- > C4/Circulation.pm | 14 +++++++------- > 1 file changed, 7 insertions(+), 7 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index 6880a8288c..bc77eba6cd 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -450,20 +450,20 @@ sub TooMany { > if (defined($maxissueqty_rule) and $maxissueqty_rule->rule_value ne "") { > > my $checkouts; >+ my $where = {}; >+ my $attr = { prefetch => 'item' }; > if ( $maxissueqty_rule->branchcode ) { > if ( C4::Context->preference('CircControl') eq 'PickupLibrary' ) { >- $checkouts = $patron->checkouts->search( >- { 'me.branchcode' => $maxissueqty_rule->branchcode } ); >+ $where = { 'me.branchcode' => $maxissueqty_rule->branchcode }; > } elsif (C4::Context->preference('CircControl') eq 'PatronLibrary') { >- $checkouts = $patron->checkouts; # if branch is the patron's home branch, then count all loans by patron >+ # if branch is the patron's home branch, then count all loans by patron > } else { >- $checkouts = $patron->checkouts->search( >- { 'item.homebranch' => $maxissueqty_rule->branchcode }, >- { prefetch => 'item' } ); >+ $where = { 'item.homebranch' => $maxissueqty_rule->branchcode }; > } > } else { >- $checkouts = $patron->checkouts; # if rule is not branch specific then count all loans by patron >+ # if rule is not branch specific then count all loans by patron > } >+ $checkouts = $patron->checkouts->search( $where, $attr ); > my $sum_checkouts; > my $rule_itemtype = $maxissueqty_rule->itemtype; > while ( my $c = $checkouts->next ) { >-- >2.20.1
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