[Bug 10243] New: Holds queue is making transfer requests that contradict the branch holds policy
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10243 Bug ID: 10243 Summary: Holds queue is making transfer requests that contradict the branch holds policy Classification: Unclassified Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Hold requests Assignee: koha-bugs@lists.koha-community.org Reporter: kyle.m.hall@gmail.com CC: gmcharlt@gmail.com For some reason MapItemsToHoldRequests will, as a last ditch effort, grab what seems to be an arbitrary available item to fill a hold request, even if it will violate the circulation rules for holds. In other words, even if an item matches a "Holds policy by item type" that says "From home library", the a request to transfer that item to another library will be added to the holds queue! -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10243 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10243 --- Comment #1 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 18137 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=18137&action=edit Bug 10243 - Holds queue is making transfer requests that contradict the branch holds policy For some reason MapItemsToHoldRequests will, as a last ditch effort, grab what seems to be an arbitrary available item to fill a hold request, even if it will violate the circulation rules for holds. In other words, even if an item matches a "Holds policy by item type" that says "From home library", a request to transfer that item to another library will be added to the holds queue! Test Plan: 1) Create a record with a an item at BranchA of item type BOOK 2) Set the holds policy such that itemtype BOOK for BranchA is set to "From home library" 3) Place a bib-level hold request for a patron with a pickup at BranchB 4) Run build_holds_queue.pl 5) You should now see a request for that item to be transfered to BranchB, even though the rules should not allow this. 6) Apply this patch 7) Run build_holds_queue.pl again 8) View the holds queue again, that request should no longer exist -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10243 --- Comment #2 from Kyle M Hall <kyle.m.hall@gmail.com> --- This patch is tested and working, but I wonder if we should simply delete lines 470-471 instead of using the code I wrote. I cannot understand the justification for what 470-471 do, and there are no comments about why it's there. I'll post an alterative that just deletes those lines, either one will resolve this bug. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10243 --- Comment #3 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 18138 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=18138&action=edit Bug 10243 - Holds queue is making transfer requests that contradict the branch holds policy - Alternate solution For some reason MapItemsToHoldRequests will, as a last ditch effort, grab what seems to be an arbitrary available item to fill a hold request, even if it will violate the circulation rules for holds. In other words, even if an item matches a "Holds policy by item type" that says "From home library", a request to transfer that item to another library will be added to the holds queue! Test Plan: 1) Create a record with a an item at BranchA of item type BOOK 2) Set the holds policy such that itemtype BOOK for BranchA is set to "From home library" 3) Place a bib-level hold request for a patron with a pickup at BranchB 4) Run build_holds_queue.pl 5) You should now see a request for that item to be transfered to BranchB, even though the rules should not allow this. 6) Apply this patch 7) Run build_holds_queue.pl again 8) View the holds queue again, that request should no longer exist -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10243 Kyle M Hall <kyle.m.hall@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #18138|0 |1 is obsolete| | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10243 Melia Meggs <melia@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #18137|0 |1 is obsolete| | --- Comment #4 from Melia Meggs <melia@bywatersolutions.com> --- Created attachment 18160 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=18160&action=edit [Signed off] Bug 10243 - Holds queue is making transfer requests that contradict the branch holds policy For some reason MapItemsToHoldRequests will, as a last ditch effort, grab what seems to be an arbitrary available item to fill a hold request, even if it will violate the circulation rules for holds. In other words, even if an item matches a "Holds policy by item type" that says "From home library", a request to transfer that item to another library will be added to the holds queue! Test Plan: 1) Create a record with a an item at BranchA of item type BOOK 2) Set the holds policy such that itemtype BOOK for BranchA is set to "From home library" 3) Place a bib-level hold request for a patron with a pickup at BranchB 4) Run build_holds_queue.pl 5) You should now see a request for that item to be transfered to BranchB, even though the rules should not allow this. 6) Apply this patch 7) Run build_holds_queue.pl again 8) View the holds queue again, that request should no longer exist Signed-off-by: Heather Braum <hbraum@nekls.org> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10243 Melia Meggs <melia@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |melia@bywatersolutions.com -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10243 Heather Braum <hbraum@nekls.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hbraum@nekls.org --- Comment #5 from Heather Braum <hbraum@nekls.org> --- I, Heather Braum, from NEKLS sign off on this patch. I have tested it on our production server and it works. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10243 --- Comment #6 from Melia Meggs <melia@bywatersolutions.com> --- *** Bug 9906 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10243 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10243 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #18160|0 |1 is obsolete| | --- Comment #7 from Chris Cormack <chris@bigballofwax.co.nz> --- Created attachment 19097 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=19097&action=edit Bug 10243 - Holds queue is making transfer requests that contradict the branch holds policy For some reason MapItemsToHoldRequests will, as a last ditch effort, grab what seems to be an arbitrary available item to fill a hold request, even if it will violate the circulation rules for holds. In other words, even if an item matches a "Holds policy by item type" that says "From home library", a request to transfer that item to another library will be added to the holds queue! Test Plan: 1) Create a record with a an item at BranchA of item type BOOK 2) Set the holds policy such that itemtype BOOK for BranchA is set to "From home library" 3) Place a bib-level hold request for a patron with a pickup at BranchB 4) Run build_holds_queue.pl 5) You should now see a request for that item to be transfered to BranchB, even though the rules should not allow this. 6) Apply this patch 7) Run build_holds_queue.pl again 8) View the holds queue again, that request should no longer exist Signed-off-by: Heather Braum <hbraum@nekls.org> Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10243 --- Comment #8 from Galen Charlton <gmcharlt@gmail.com> --- Would you mind adding test cases for this situation to t/db_dependent/HoldsQueue.t? Since HoldsQueue.t is pretty well fleshed out already, it should be easier to add regression tests for this than might be the case with other modules. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10243 --- Comment #9 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 21121 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=21121&action=edit Bug 10243 - Holds queue is making transfer requests that contradict the branch holds policy - Unit Tests -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10243 --- Comment #10 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 21927 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=21927&action=edit Bug 10243 - Holds queue is making transfer requests that contradict the branch holds policy - QA Followup Using the TransportCostMatrix can cause the same issue. Removing the last ditch use of the first item causes the the subroutine to continue with the traditional matching, which will respect the hold policies. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10243 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #11 from Galen Charlton <gmcharlt@gmail.com> --- Pushed to master. Thanks, Kyle! -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10243 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable CC| |tomascohen@gmail.com --- Comment #12 from Tomás Cohen Arazi <tomascohen@gmail.com> --- This patch has been pushed to 3.12.x, will be in 3.12.8. Thanks Kyle! -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org