[Bug 42255] New: Grouped holds counted inconsistently for circ rules
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42255 Bug ID: 42255 Summary: Grouped holds counted inconsistently for circ rules Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Hold requests Assignee: koha-bugs@lists.koha-community.org Reporter: andrew@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, lisette@bywatersolutions.com, tomascohen@gmail.com Depends on: 15516 With grouped holds enabled, Koha sometimes counts all holds individually and sometimes counts all of the holds in a group as just 1. To confirm: Enable 1 - set a circ rule with: -- Holds allowed (total): Unlimited -- Holds allowed (daily): Unlimited -- Holds per record (count): 2 2 - Place 2 holds on the same record for the same patron 3 - Try to place a 3rd hold, get an error "too many holds" 4 - group your 2 existing holds 5 - try to place a 3rd hold; it works! 6 - set a circ rule with: -- Holds allowed (total): Unlimited -- Holds allowed (daily): 2 -- Holds per record (count): Unlimited 7 - Place 2 holds in the same day for the same patron 8 - Try to place a 3rd hold, get an error "too many holds" 9 - group your 2 existing holds 10 - try to place a 3rd hold; it works! 11 - set a circ rule with: -- Holds allowed (total): 2 -- Holds allowed (daily): Unlimited -- Holds per record (count): Unlimited 7 - Place 2 holds in the same day for the same patron 8 - Try to place a 3rd hold, get an error "too many holds" 9 - group your 2 existing holds 10 - try to place a 3rd hold; still get an error "too many holds" Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15516 [Bug 15516] Allow to place a hold on first available item from a group of titles -- 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=42255 --- Comment #1 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- (apologies for janking up the numbers on my steps above) My proposed solution here is to make Holds Allowed (total) count holds the same way as the other rules: Total holds = ungrouped holds + number of distinct hold groups. This sidesteps the issue in Bug 42168 as it makes the number on the patron's holds tab match the number of total holds as counted by all circ rules. When/if a library wants to enforce rules based on holds count regardless of grouping, we can look at a new configuration option to allow that logic to be applied consistently. -- 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=42255 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=42256 -- 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=42255 --- Comment #2 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- I forgot to test the other way you can limit number of holds .... "Maximum total holds allowed (count)" in the hold policy section counts all individual holds regardless of groups, the same as Holds Allowed (total) in the circ rules. - set a circ rule with: -- Holds allowed (total): Unlimited -- Holds allowed (daily): Unlimited -- Holds per record (count): Unlimited - Maximum total holds allowed (count): 2 - Place 2 holds for the same patron - Try to place a 3rd hold, get an error "too many holds" - group your 2 existing holds - try to place a 3rd hold; still get an error "too many holds" -- 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=42255 Sara Brown <sbrown@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |sbrown@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42255 Danielle M. <dmeininger591@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dmeininger591@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42255 --- Comment #3 from Sara Brown <sbrown@bywatersolutions.com> --- Counting a group as one hold feels more fair with the concept of a group, but I'm not sure how it will apply/calculate in a practical sense. Issue 1: How would this look when multiple 'Holds allowed (Total)' rules apply? For example: Group A has 5 Books (Rule 1). This would count as 1 toward 'Holds allowed (Total)', and 1 toward 'Maximum total holds allowed (count)'. But group B has 2 Book titles (Rule 1), 1 Audiobook (Rule 2), and 1 Large print (Rule 3). Would the group count as 1 hold toward Rule 1, 1 toward Rule 2, and 1 toward Rule 3? Would it count as 1 or 3 toward 'Maximum total holds allowed (count)'? I think it might be confusing if sometimes the sum of 'Holds allowed (total)' = 'Maximum total holds allowed (count)' [Group A: 1 'Holds allowed (total)' = 1 'Maximum total holds allowed (count)'], but other times, the sum of 'Holds allowed (total)' > 'Maximum total holds allowed (count)' [Group B: 3 'Holds allowed (total)' > 1 'Maximum total holds allowed (count)']. Issue 2: If a system's ReservesControlBranch is 'item's home library' and titles are from different libraries, which library's rules are used for 'Holds allowed (Total)' and 'Maximum total holds allowed (count)'? For example: -Group C has 3 titles (all itype Book) -North allows 2 Book holds, Main allows 3, and East allows 4 ('Holds allowed (Total)') -Bib 1 has only has North copies, bib 2 only has Main copies, and bib 3 only has East copies --North allows 5 total holds, Main allows 10, and East allows 6 ('Maximum total holds allowed (count)') Does Koha use North, Main, or East's Book 'Holds allowed (Total)'? And which library's 'Maximum total holds allowed (count)' does this count toward? -- 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=42255 --- Comment #4 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- (In reply to Sara Brown from comment #3)
But group B has 2 Book titles (Rule 1), 1 Audiobook (Rule 2), and 1 Large print (Rule 3). Would the group count as 1 hold toward Rule 1, 1 toward Rule 2, and 1 toward Rule 3? Would it count as 1 or 3 toward 'Maximum total holds allowed (count)'?
I'd expect each group of holds to count as 1 hold toward any rule that applies to one or more of the items in the group. So in this example the group would count as 1 for each of your 3 itemtype-specific rules and as 1 for the umbrella total holds rule. So the group counts similarly to a single biblio-level hold on a record that has items of multiple different itemtypes -- if the bib has a book, an audiobook, and a large print, that hold gets counted when checking against rules about any of those itemtypes.
Issue 2: If a system's ReservesControlBranch is 'item's home library' and titles are from different libraries, which library's rules are used for 'Holds allowed (Total)' and 'Maximum total holds allowed (count)'? For example:
-Group C has 3 titles (all itype Book) -North allows 2 Book holds, Main allows 3, and East allows 4 ('Holds allowed (Total)') -Bib 1 has only has North copies, bib 2 only has Main copies, and bib 3 only has East copies --North allows 5 total holds, Main allows 10, and East allows 6 ('Maximum total holds allowed (count)')
Does Koha use North, Main, or East's Book 'Holds allowed (Total)'? And which library's 'Maximum total holds allowed (count)' does this count toward?
When the patron tries to place a new hold, Koha will use the total holds allowed rule for the homebranch of then item the patron is attempting to hold. So your example patron would be allowed to place up to 4 more holds on North items, 9 more holds on Main items, and 5 more holds on East items. -- 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=42255 Catrina Berka <catrina@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |catrina@bywatersolutions.co | |m -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42255 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42255 Emily Lamancusa (emlam) <emily.lamancusa@montgomerycountymd.gov> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |emily.lamancusa@montgomeryc | |ountymd.gov -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42255 Pedro Amorim <pedro.amorim@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |pedro.amorim@openfifth.co.u |ity.org |k CC| |pedro.amorim@openfifth.co.u | |k -- 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=42255 Pedro Amorim <pedro.amorim@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42255 --- Comment #5 from Pedro Amorim <pedro.amorim@openfifth.co.uk> --- Created attachment 198741 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=198741&action=edit Bug 42255: Holds allowed (total) Make 'Holds allowed (total)' (aka reservesallowed) consider each hold group as an individual hold Test plan: 1) Enable DisplayAddHoldGroups sys pref 2) Set Holds allowed (total) to 2, visit: http://localhost:8081/cgi-bin/koha/admin/smart-rules.pl 3) Scroll to the right, click the 'Edit' button under 'Actions' column. 4) On the 'Holds allowed (total)' column cell, enter '2' and click 'Save' under the 'Actions' column to the right. 5) Search for 'test': http://localhost:8081/cgi-bin/koha/catalogue/search.pl?q=test 6) Tick the checkbox next the first and second results, click 'Place hold' button at the top toolbar 7) Search for 'koha' user and pick Koha (42) 8) Set a pickup location for each hold and tick the 'Treat as hold group' checkbox. Click 'Place holds'. 9) Try to place another single hold for the same patron. Should succeed, because the 2 grouped holds count as 1. Patron now should have 1 group + 1 ungrouped hold = effective count of 2. 10) Try to place yet another hold, should be blocked with a tooManyHolds error. 11) Prior to this patch, step 9 would've failed because the 2 grouped holds counted as 2. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42255 --- Comment #6 from Pedro Amorim <pedro.amorim@openfifth.co.uk> --- Created attachment 198742 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=198742&action=edit Bug 42255: Maximum total holds allowed (count) Make 'Maximum total holds allowed (count)' (aka max_holds) consider hold groups Test plan: Same as the previous test plan, but set 'Maximum total holds allowed (count)' as 2 and instead set 'Holds allowed (total)' as unlimited. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42255 --- Comment #7 from Pedro Amorim <pedro.amorim@openfifth.co.uk> --- Created attachment 198743 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=198743&action=edit Bug 42255: Add tests prove t/db_dependent/Reserves.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42255 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |andrew@bywatersolutions.com |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42255 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=42255 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #198741|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42255 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #198742|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42255 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #198743|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42255 --- Comment #8 from David Nind <david@davidnind.com> --- Created attachment 198882 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=198882&action=edit Bug 42255: Holds allowed (total) Make 'Holds allowed (total)' (aka reservesallowed) consider each hold group as an individual hold Test plan: 1) Enable DisplayAddHoldGroups sys pref 2) Set Holds allowed (total) to 2, visit: http://localhost:8081/cgi-bin/koha/admin/smart-rules.pl 3) Scroll to the right, click the 'Edit' button under 'Actions' column. 4) On the 'Holds allowed (total)' column cell, enter '2' and click 'Save' under the 'Actions' column to the right. 5) Search for 'test': http://localhost:8081/cgi-bin/koha/catalogue/search.pl?q=test 6) Tick the checkbox next the first and second results, click 'Place hold' button at the top toolbar 7) Search for 'koha' user and pick Koha (42) 8) Set a pickup location for each hold and tick the 'Treat as hold group' checkbox. Click 'Place holds'. 9) Try to place another single hold for the same patron. Should succeed, because the 2 grouped holds count as 1. Patron now should have 1 group + 1 ungrouped hold = effective count of 2. 10) Try to place yet another hold, should be blocked with a tooManyHolds error. 11) Prior to this patch, step 9 would've failed because the 2 grouped holds counted as 2. 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=42255 --- Comment #9 from David Nind <david@davidnind.com> --- Created attachment 198883 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=198883&action=edit Bug 42255: Maximum total holds allowed (count) Make 'Maximum total holds allowed (count)' (aka max_holds) consider hold groups Test plan: Same as the previous test plan, but set 'Maximum total holds allowed (count)' as 2 and instead set 'Holds allowed (total)' as unlimited. 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=42255 --- Comment #10 from David Nind <david@davidnind.com> --- Created attachment 198884 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=198884&action=edit Bug 42255: Add tests prove t/db_dependent/Reserves.t 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=42255 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com Text to go in the| |This fixes placing holds release notes| |when group holds are | |enabled | |(DisplayAddHoldGroups | |system preference), so that | |a group hold only counts as | |one hold. | | | |Previously, each hold in | |the hold group was counted | |as a hold. So if the "Holds | |allowed (total)" or | |"Maximum total holds | |allowed (count)" | |circulation and fine rules | |values were exceeded you | |would not be able to place | |additional holds and get a | |message "Too many holds: | |[patron name] can place of | |the requested holds for a | |maximum of XX total | |holds.". | | | |Example: if the total holds | |allowed is set to 2 and a | |group hold was placed on | |two records, this was | |counted as 2 holds - | |placing an additional hold | |would result in the the | |"Too many holds" message. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42255 --- Comment #11 from David Nind <david@davidnind.com> --- Testing notes (using KTD): 1. For the second patch, "Maximum total holds allowed (count)" is located further down the circulation and fine rules page under the "Default checkout, hold and return policy" section. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42255 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42255 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #198882|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42255 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #198883|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42255 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #198884|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42255 --- Comment #12 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 198886 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=198886&action=edit Bug 42255: Holds allowed (total) Make 'Holds allowed (total)' (aka reservesallowed) consider each hold group as an individual hold Test plan: 1) Enable DisplayAddHoldGroups sys pref 2) Set Holds allowed (total) to 2, visit: http://localhost:8081/cgi-bin/koha/admin/smart-rules.pl 3) Scroll to the right, click the 'Edit' button under 'Actions' column. 4) On the 'Holds allowed (total)' column cell, enter '2' and click 'Save' under the 'Actions' column to the right. 5) Search for 'test': http://localhost:8081/cgi-bin/koha/catalogue/search.pl?q=test 6) Tick the checkbox next the first and second results, click 'Place hold' button at the top toolbar 7) Search for 'koha' user and pick Koha (42) 8) Set a pickup location for each hold and tick the 'Treat as hold group' checkbox. Click 'Place holds'. 9) Try to place another single hold for the same patron. Should succeed, because the 2 grouped holds count as 1. Patron now should have 1 group + 1 ungrouped hold = effective count of 2. 10) Try to place yet another hold, should be blocked with a tooManyHolds error. 11) Prior to this patch, step 9 would've failed because the 2 grouped holds counted as 2. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42255 --- Comment #13 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 198887 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=198887&action=edit Bug 42255: Maximum total holds allowed (count) Make 'Maximum total holds allowed (count)' (aka max_holds) consider hold groups Test plan: Same as the previous test plan, but set 'Maximum total holds allowed (count)' as 2 and instead set 'Holds allowed (total)' as unlimited. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42255 --- Comment #14 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 198888 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=198888&action=edit Bug 42255: Add tests prove t/db_dependent/Reserves.t Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42255 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |42570 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42570 [Bug 42570] OPAC patron summary shows literal holds count instead of group-aware count -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42255 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |26.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=42255 --- Comment #15 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Nice work everyone! Pushed to main for 26.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42255 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rel_25_11_candidate -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42255 Jacob O'Mara <jacob.omara@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|26.05.00 |26.05.00,25.11.05 released in| | Status|Pushed to main |Pushed to stable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42255 --- Comment #16 from Jacob O'Mara <jacob.omara@openfifth.co.uk> --- Thanks all, pushed to 25.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42255 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Needs documenting --- Comment #17 from David Cook <dcook@prosentient.com.au> --- Depends on bug 15516 so not relevant for backporting from here. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org