[Bug 43378] New: Wrong hold can be selected when LocalHoldsPriority set to GiveLibraryAndGroup
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43378 Bug ID: 43378 Summary: Wrong hold can be selected when LocalHoldsPriority set to GiveLibraryAndGroup Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Hold requests Assignee: koha-bugs@lists.koha-community.org Reporter: nick@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, lisette@bywatersolutions.com, tomascohen@gmail.com Target Milestone: --- In C4::Reserves::CheckReserves: if ( !$local_hold_match && $LocalHoldsPriority eq ('GiveLibraryAndGroup') ) { # If there's no match at the library level, check hold groups $local_hold_group_match = Koha::Libraries->find( { branchcode => $local_holds_priority_item_branchcode } )->validate_hold_sibling( { branchcode => $local_holds_priority_patron_branchcode } ); } Then: # See if this item is more important than what we've got so far if ( ( $res->{'priority'} && $res->{'priority'} < $priority ) || $local_hold_match || $local_hold_group_match ) { next Then: last if $local_hold_match || ( ( $LocalHoldsPriority eq 'GiveLibraryGroup' ) && $local_hold_group_match ); That last condition needs to OR "eq 'GiveLibraryAndGroup'" - otherwise we are setting local_hold_group_match, but not exiting the loop, and we pick the local hold group match with the highest priority -- 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=43378 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |lisette@bywatersolutions.co |ity.org |m Depends on| |20747 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20747 [Bug 20747] Allow LocalHoldsPriority to fill by hierarchical groups system rather than individual library -- 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=43378 Lisette Scheer <lisette@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43378 Lisette Scheer <lisette@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Signed Off --- Comment #1 from Lisette Scheer <lisette@bywatersolutions.com> --- Bug 43378: Add check for overwriting $highest when a group hold matches To test, before applying patches: 1. Create a library group 2. Add 2 libraries to it 3. Make 2 patrons at the same library in the group 4. Create an item at the other group branch 5. Place 2 bib level holds for the patrons from step 3 6. Check in the item 7. Observe the hold tries to fill the last hold. Don't confirm the hold 8. Apply the patches 9. Repeat step 6 10. Observe the hold now tries to fill the first hold. 11. prove t/db_dependent/Holds/LocalHoldsPriority.t All tests should pass! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43378 --- Comment #2 from Lisette Scheer <lisette@bywatersolutions.com> --- Created attachment 205383 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205383&action=edit Bug 43378: Add check for overwriting $highest when a group hold matches To test, before applying patches: 1. Create a library group 2. Add 2 libraries to it 3. Make 2 patrons at the same library in the group 4. Create an item at the other group branch 5. Place 2 bib level holds for the patrons from step 3 6. Check in the item 7. Observe the hold tries to fill the last hold. Don't confirm the hold 8. Apply the patches 9. Repeat step 6 10. Observe the hold now tries to fill the first hold. 11. prove t/db_dependent/Holds/LocalHoldsPriority.t All tests should pass! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43378 Lisette Scheer <lisette@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43378 Andrew Fuerste-Henry <andrew@bywatersolutions.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=43378 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #205383|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=43378 --- Comment #3 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 206654 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=206654&action=edit Bug 43378: Add check for overwriting $highest when a group hold matches To test, before applying patches: 1. Create a library group 2. Add 2 libraries to it 3. Make 2 patrons at the same library in the group 4. Create an item at the other group branch 5. Place 2 bib level holds for the patrons from step 3 6. Check in the item 7. Observe the hold tries to fill the last hold. Don't confirm the hold 8. Apply the patches 9. Repeat step 6 10. Observe the hold now tries to fill the first hold. 11. prove t/db_dependent/Holds/LocalHoldsPriority.t All tests should pass! Signed-off-by: Stephanie Baker <sbaker@aclsys.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43378 Lisette Scheer <lisette@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |jacob.omara@openfifth.co.uk |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43378 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrew@bywatersolutions.com --- Comment #4 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Adding a little additional detail: To test, before applying patches: Set LocalHodsPriority: Library and Library Group LocalHodsPriorityPatronControl: Home Library LocalHodsPriorityItemControl: Holding Library 1. Create a library group 2. Add 2 libraries to it 3. Make 2 patrons at the same library in the group 4. Create an item at the other group branch 5. Place 2 bib level holds for the patrons from step 3 - Holds for pickup at the item's holding library So your holds qualify for LocalHoldsPriority because the item's holding library is in the same group as the patron home library, but they do not match directly. 6. Check in the item 7. Observe the hold tries to fill the last hold. Don't confirm the hold 8. Apply the patches 9. Repeat step 6 10. Observe the hold now tries to fill the first hold. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43378 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|jacob.omara@openfifth.co.uk |andrew@bywatersolutions.com 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=43378 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #206654|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=43378 --- Comment #5 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 207827 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=207827&action=edit Bug 43378: Add check for overwriting $highest when a group hold matches To test, before applying patches: 1. Create a library group 2. Add 2 libraries to it 3. Make 2 patrons at the same library in the group 4. Create an item at the other group branch 5. Place 2 bib level holds for the patrons from step 3 6. Check in the item 7. Observe the hold tries to fill the last hold. Don't confirm the hold 8. Apply the patches 9. Repeat step 6 10. Observe the hold now tries to fill the first hold. 11. prove t/db_dependent/Holds/LocalHoldsPriority.t All tests should pass! Signed-off-by: Stephanie Baker <sbaker@aclsys.org> 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=43378 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Signed Off QA Contact|andrew@bywatersolutions.com |jacob.omara@openfifth.co.uk --- Comment #6 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Oh whoops! I've been looking for bugs written by ByWater folk that have been signed off for more than a month and therefore can be QAed internally but this one came up in my search in error. I can't QA this for another 11 days. Setting back to Signed Off. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43378 Jacob O'Mara <jacob.omara@openfifth.co.uk> 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=43378 Jacob O'Mara <jacob.omara@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #207827|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=43378 --- Comment #7 from Jacob O'Mara <jacob.omara@openfifth.co.uk> --- Created attachment 208132 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=208132&action=edit Bug 43378: Add check for overwriting $highest when a group hold matches To test, before applying patches: 1. Create a library group 2. Add 2 libraries to it 3. Make 2 patrons at the same library in the group 4. Create an item at the other group branch 5. Place 2 bib level holds for the patrons from step 3 6. Check in the item 7. Observe the hold tries to fill the last hold. Don't confirm the hold 8. Apply the patches 9. Repeat step 6 10. Observe the hold now tries to fill the first hold. 11. prove t/db_dependent/Holds/LocalHoldsPriority.t All tests should pass! Signed-off-by: Stephanie Baker <sbaker@aclsys.org> Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com> Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43378 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rel_26_11_candidate -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43378 Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to main Version(s)| |26.11.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43378 --- Comment #8 from Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> --- Thanks everyone! Pushed to main for 26.11! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43378 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|rel_26_11_candidate |rel_26_05_candidate -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43378 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|26.11.00 |26.11.00,26.05.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=43378 --- Comment #9 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Nice work everyone! Pushed to 26.05.x for the upcoming 26.05.05 release. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43378 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com Keywords|rel_26_05_candidate | -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org