[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.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org