Bugzilla – Attachment 88531 Details for
Bug 22759
Circulation rules for maxissueqty are applied per branch even for defaults
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22759: Fix wrong check of branch rule in C4::Circulation::TooMany
Bug-22759-Fix-wrong-check-of-branch-rule-in-C4Circ.patch (text/plain), 2.25 KB, created by
Nick Clemens (kidclamp)
on 2019-04-23 16:22:47 UTC
(
hide
)
Description:
Bug 22759: Fix wrong check of branch rule in C4::Circulation::TooMany
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2019-04-23 16:22:47 UTC
Size:
2.25 KB
patch
obsolete
>From 0b0bcf567412df554825cef2744dfd14ac496298 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Tue, 23 Apr 2019 16:18:51 +0000 >Subject: [PATCH] Bug 22759: Fix wrong check of branch rule in > C4::Circulation::TooMany > >The condition in TooMany applied branch limits only if the rule didn't have a branchcode, this was wrong > >To test: > 1 - Find a title in the catalog, add 8 items, all of a single itemtype, 4 for branch A, four for branch B > 2 - Remove any specific circ rules > 3 - Set a default circ rule for the itemtype used above, limiting the max issue quantity to 3 > 4 - Find a patron and checkout the items from branch A > 5 - You should be allowed to checkout 3, but the fourth should trigger 'too many' > 6 - Now checkout the items from branch B, again you can checkout 3 and not four > 7 - Apply this patch > 8 - Assuming you have 6 items out now, try one from either branch, you should trigger 'too many' and have 6 > 9 - Return two from branch B and one from branch A >10 - Now you have three items issued total >11 - An item from either branch should be refused now >12 - Test with different values of 'CircControl' and confirm your expectations are met >--- > C4/Circulation.pm | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index c93ee3d302..53b74bb7cc 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -458,15 +458,15 @@ sub TooMany { > $count_query .= " AND borrowernumber = ? "; > push @bind_params, $borrower->{'borrowernumber'}; > my $rule_branch = $maxissueqty_rule->branchcode; >- unless ($rule_branch) { >+ if ($rule_branch) { > if (C4::Context->preference('CircControl') eq 'PickupLibrary') { > $count_query .= " AND issues.branchcode = ? "; >- push @bind_params, $branch; >+ push @bind_params, $rule_branch; > } elsif (C4::Context->preference('CircControl') eq 'PatronLibrary') { > ; # if branch is the patron's home branch, then count all loans by patron > } else { > $count_query .= " AND items.homebranch = ? "; >- push @bind_params, $branch; >+ push @bind_params, $rule_branch; > } > } > >-- >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 22759
:
88530
|
88531
|
88538
|
88540
|
88565
|
88566