Summary: | TransportCostMatrix should be checked after HoldsQueuePrioritizeBranch | ||
---|---|---|---|
Product: | Koha | Reporter: | Nick Clemens (kidclamp) <nick> |
Component: | Hold requests | Assignee: | Nick Clemens (kidclamp) <nick> |
Status: | CLOSED INVALID | QA Contact: | Testopia <testopia> |
Severity: | major | ||
Priority: | P5 - low | CC: | gmcharlt |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33794 | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | --- | Documentation contact: | |
Documentation submission: | Text to go in the release notes: | ||
Version(s) released in: | Circulation function: | ||
Attachments: |
Bug 35431: Unit tests
Bug 35431: Check TransportCostMatrix if hold not filled by HoldsQueuePrioritizeBranch |
Description
Nick Clemens (kidclamp)
2023-11-29 13:03:24 UTC
Created attachment 159335 [details] [review] Bug 35431: Unit tests Created attachment 159336 [details] [review] Bug 35431: Check TransportCostMatrix if hold not filled by HoldsQueuePrioritizeBranch This patch changes an elsif to an if to ensure the matrix is checked every time To test: 1 - Apply unit test patch only 2 - prove -v t/db_dependent/HoldQueue.t 3 - It fails 4 - Apply this patch 5 - prove -v t/db_dependent/HoldQueue.t 6 - It passes 7 - All other tests continue to pass as well This was a lesson in how the holds queue works, the TCM is skipped here in the case where there are items available/held at the pickup location of the hold, even when checked in this piece of the code, we are looking for HoldsQueuePrioritizeBranch matches We set the 'holdingbranch' variable here to either the pickup library (if there are items held there) or to the lowest cost branch. The code next checks if there are items where the items home branch and the holds pickup location match, and fills those - trying to get items back to where they are from If there are none, then the holdingbranch variable is checked to see if items from that library can fill - this is the actual matrix checking Filing a new bug for adding more comments to the routine here |