Bugzilla – Attachment 161031 Details for
Bug 30324
Parent and child itemtype checkout limits not enforced as expected
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30324: Don't use default rule if we have a parent rule
Bug-30324-Dont-use-default-rule-if-we-have-a-paren.patch (text/plain), 2.34 KB, created by
David Nind
on 2024-01-14 21:35:32 UTC
(
hide
)
Description:
Bug 30324: Don't use default rule if we have a parent rule
Filename:
MIME Type:
Creator:
David Nind
Created:
2024-01-14 21:35:32 UTC
Size:
2.34 KB
patch
obsolete
>From 954150b5b4a9cbee7c93b96da0d4cb62b002fa3f Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Thu, 11 Jan 2024 16:21:48 +0000 >Subject: [PATCH] Bug 30324: Don't use default rule if we have a parent rule > >Currenty, if we find only a defult rule for a checkout we are ignoring the parent rule. >We should not use the default if there is a parent rule > >To test: > 1: have an itype BK > 2: create an itype BK2, set BK as the parent to BK2 > 3: create a circ rule for All Patrons, item type BK (displays as "Books (All)" in the circ rules interface), setting total checkouts to 1 > 4: do not create any rule specifically for the BK2 itype > 5: have some BK items and some BK2 items > 6: check a BK item out to a patron > 7: check a BK2 item out to the same patron, observe you are not blocked from doing so > 8: try to check out a second BK2 item to the same patron, get message "Too many checked out. 1 checked out, only 1 are allowed." > 9: try to check out a second BK item to the same patrons, get message "Too many checked out. 2 checked out, only 1 are allowed." >10: return both items >11: check a BK2 item out to your patron >12: try to check a BK item out to your patron, get message "Too many checked out. 1 checked out, only 1 are allowed." >13: Apply patch >14: Repeat 7, you are now blocked >15: Other results should be the same > >Signed-off-by: David Nind <david@davidnind.com> >--- > C4/Circulation.pm | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index 29abc95ac7..ddc08faaeb 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -487,7 +487,7 @@ sub TooMany { > my $rule_itemtype = $maxissueqty_rule->itemtype; > > my @types; >- unless ( $rule_itemtype ) { >+ unless ( $rule_itemtype || $parent_maxissueqty_rule ) { > # matching rule has the default item type, so count only > # those existing loans that don't fall under a more > # specific rule >@@ -519,7 +519,7 @@ sub TooMany { > while ( my $c = $checkouts->next ) { > my $itemtype = $c->item->effective_itemtype; > >- unless ( $rule_itemtype ) { >+ unless ( $rule_itemtype || $parent_maxissueqty_rule ) { > next if grep {$_ eq $itemtype} @types; > } else { > next unless grep {$_ eq $itemtype} @types; >-- >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 30324
:
160877
|
160878
|
161030
|
161031
|
161161
|
165663
|
165664
|
165665
|
165704
|
165705
|
165706