[Bug 30324] New: Parent and child itemtype checkout limits not enforced as expected
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30324 Bug ID: 30324 Summary: Parent and child itemtype checkout limits not enforced as expected Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Circulation Assignee: koha-bugs@lists.koha-community.org Reporter: andrew@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com Depends on: 21946 When creating rules or parent and child item types, checkout limits are enforced confusingly. To recreate: 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." We're somehow not enforcing parent/child rules reciprocally. That forces me to explicitly define my child checkout limit, defeating some of the point of the enhancement from bug 21946. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21946 [Bug 21946] Group circulation by item type -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30324 Bug 30324 depends on bug 21946, which changed state. Bug 21946 Summary: Group circulation by item type https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21946 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30324 hebah@bywatersolutions.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hebah@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30324 Lisette Scheer <lisette.scheer@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lisette.scheer@bywatersolut | |ions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30324 Michael Adamyk <madamyk@ckls.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |madamyk@ckls.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30324 Lisette Scheer <lisette.scheer@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=35704 -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30324 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30324 --- Comment #1 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 160877 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=160877&action=edit Bug 30324: Unit tests -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30324 --- Comment #2 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 160878 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=160878&action=edit 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 -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30324 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |35776 Assignee|koha-bugs@lists.koha-commun |nick@bywatersolutions.com |ity.org | CC| |nick@bywatersolutions.com Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35776 [Bug 35776] Wrong circulation rule displayed when parent itemtypes are used -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30324 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30324 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #160877|0 |1 is obsolete| | --- Comment #3 from David Nind <david@davidnind.com> --- Created attachment 161030 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=161030&action=edit Bug 30324: Unit tests Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30324 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #160878|0 |1 is obsolete| | --- Comment #4 from David Nind <david@davidnind.com> --- Created attachment 161031 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=161031&action=edit 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> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30324 Biblibre Sandboxes <sandboxes@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #161031|0 |1 is obsolete| | --- Comment #5 from Biblibre Sandboxes <sandboxes@biblibre.com> --- Created attachment 161161 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=161161&action=edit 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> Signed-off-by: Michael Adamyk <madamyk@ckls.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30324 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |victor@tuxayo.net --- Comment #6 from Victor Grousset/tuxayo <victor@tuxayo.net> ---
15: Other results should be the same
9 isn't the same. And it shouldn't be the same. Because 7 failed, it's not "2 checked out" but "1 checked out". So what happens makes sense. Thanks for the test plan with all those combination. It's great! :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30324 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |victor@tuxayo.net |y.org | Status|Signed Off |Failed QA --- Comment #7 from Victor Grousset/tuxayo <victor@tuxayo.net> ---
#Patron has 1 checkout of parent itemtype {{{{ child itype1
What does {{{{ means? My guess is that «{{{{ child itype1» isn't meant to be here. And it's just some mistyping in vim ^^ +# my $circ_rule_object = +# Koha::CirculationRules->find( $parent_iq_rule->{id} ); +# $circ_rule_object->rule_value(4)->store(); --- There is a probably forgotten comment: +# my $circ_rule_object = +# Koha::CirculationRules->find( $parent_iq_rule->{id} ); +# $circ_rule_object->rule_value(4)->store(); Otherwise, all seems to work as it should and code looks good :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30324 Catrina Berka <catrina@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |catrina@bywatersolutions.co | |m --- Comment #8 from Catrina Berka <catrina@bywatersolutions.com> --- This bug is also affecting hold limits. For example, I have two child item types (Audio book and new books) under a parent Book. In my circulation rules, I set Holds allowed (total) for audio books and new books to 1 each and then set my Book rule to 4. I place a hold on an audio book. It successfully prevents me from placing a second hold. I do the same with new books - first hold successfully placed, second prevented. When I attempt to place a first hold on a Book, I get the error Cannot place hold - Too many holds: can only place a maximum of 2 total holds. Koha is only adding the holds allowed from the children item types, not considering the parent or default limits. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30324 --- Comment #9 from Nick Clemens <nick@bywatersolutions.com> --- (In reply to Catrina Berka from comment #8)
This bug is also affecting hold limits. For example, I have two child item types (Audio book and new books) under a parent Book. In my circulation rules, I set Holds allowed (total) for audio books and new books to 1 each and then set my Book rule to 4. I place a hold on an audio book. It successfully prevents me from placing a second hold. I do the same with new books - first hold successfully placed, second prevented. When I attempt to place a first hold on a Book, I get the error Cannot place hold - Too many holds: can only place a maximum of 2 total holds. Koha is only adding the holds allowed from the children item types, not considering the parent or default limits.
Parent/child types don't currently affect holds - see bug 35704 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30324 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30324 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #161030|0 |1 is obsolete| | Attachment #161161|0 |1 is obsolete| | --- Comment #10 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 165663 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=165663&action=edit Bug 30324: Unit tests Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30324 --- Comment #11 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 165664 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=165664&action=edit 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> Signed-off-by: Michael Adamyk <madamyk@ckls.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30324 --- Comment #12 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 165665 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=165665&action=edit Bug 30324: (follow-up) Remove stray comments -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30324 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #165663|0 |1 is obsolete| | --- Comment #13 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Created attachment 165704 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=165704&action=edit Bug 30324: Unit tests Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30324 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #165664|0 |1 is obsolete| | --- Comment #14 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Created attachment 165705 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=165705&action=edit 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> Signed-off-by: Michael Adamyk <madamyk@ckls.org> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30324 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #165665|0 |1 is obsolete| | --- Comment #15 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Created attachment 165706 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=165706&action=edit Bug 30324: (follow-up) Remove stray comments Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30324 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #16 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Works, makes sense, QA script happy, code looks good, passing QA :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30324 --- Comment #17 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Always so happy about the accompanying unit tests, Nick. You are a star :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30324 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |24.05.00 released in| | Status|Passed QA |Pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30324 --- Comment #18 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 24.05! Well done everyone, thank you! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30324 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|24.05.00 |24.05.00,23.11.06 released in| | Status|Pushed to main |Pushed to stable CC| |fridolin.somers@biblibre.co | |m --- Comment #19 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 23.11.x for 23.11.06 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30324 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |RESOLVED Resolution|--- |FIXED CC| |lucas@bywatersolutions.com --- Comment #20 from Lucas Gass <lucas@bywatersolutions.com> --- Doesn't apply to 23.05.x, no backport. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org