Bugzilla – Attachment 189838 Details for
Bug 41280
Adjust PatronLibrary scope, respect global level for the second patron_maxissueqty rule in C4::Circulation::TooMany
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41280: Add check on branchcode of patron_maxissueqty rule
Bug-41280-Add-check-on-branchcode-of-patronmaxissu.patch (text/plain), 1.56 KB, created by
Marcel de Rooy
on 2025-11-21 11:13:14 UTC
(
hide
)
Description:
Bug 41280: Add check on branchcode of patron_maxissueqty rule
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2025-11-21 11:13:14 UTC
Size:
1.56 KB
patch
obsolete
>From a6af4502aa62a07e25a4efb2a759ec3691643692 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Fri, 21 Nov 2025 11:05:31 +0100 >Subject: [PATCH] Bug 41280: Add check on branchcode of patron_maxissueqty rule >Content-Type: text/plain; charset=utf-8 > >Test plan: >Still coming >--- > C4/Circulation.pm | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index 0a8df34263..c382f0ed4b 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -591,11 +591,11 @@ sub TooMany { > if ( defined( $branch_borrower_circ_rule->{patron_maxissueqty} ) > and $branch_borrower_circ_rule->{patron_maxissueqty} ne '' ) > { >- my $checkouts; >- if ( C4::Context->preference('CircControl') eq 'PickupLibrary' ) { >+ my $checkouts = $patron->checkouts; >+ if ( !$branch_borrower_circ_rule->{branchcode} ) { # global level: look at all checkouts >+ } elsif ( C4::Context->preference('CircControl') eq 'PatronLibrary' ) { # do the same >+ } elsif ( C4::Context->preference('CircControl') eq 'PickupLibrary' ) { > $checkouts = $patron->checkouts->search( { 'me.branchcode' => $branch } ); >- } elsif ( C4::Context->preference('CircControl') eq 'PatronLibrary' ) { >- $checkouts = $patron->checkouts; # if branch is the patron's home branch, then count all loans by patron > } else { > my $branch_type = C4::Context->preference('HomeOrHoldingBranch') || 'homebranch'; > $checkouts = $patron->checkouts->search( >-- >2.39.5
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 41280
:
189836
|
189837
| 189838 |
189839