https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41959
Bug ID: 41959
Summary: Holds queue builder doesn't always check all holds
when using transport cost matrix
Initiative type: ---
Sponsorship ---
status:
Product: Koha
Version: Main
Hardware: All
OS: All
Status: NEW
Severity: major
Priority: P5 - low
Component: Hold requests
Assignee: [email protected]
Reporter: [email protected]
QA Contact: [email protected]
CC: [email protected], [email protected],
[email protected]
The scenario presented itself under a specific circumstance
Library A ordered a copy of a book and left in 'on order' status
Library B purchased a copy and made it available
Each library can only fill holds on their own items
The transport cost matrix only allows items to transfer to their own branch
The transfer limits only allows items to transfer to their own branch
A patron of Library A places a title level hold, it can't fill because library
A's item is unavailable (on order)
A patron of Library B places a title level hold, it should be queued for
library B's item
In C4::HoldsQueue::MapItemsToHoldRequests we call
_allocateWithTransportCostMatrix
In _allocateWithTranportCostMatrix we have this code:
if ( $num_tasks > $num_agents ) {
@remaining = @requests[ $num_agents .. $num_tasks - 1 ];
@requests = @requests[ 0 .. $num_agents - 1 ];
$num_tasks = $num_agents;
}
task = requests and agents = items
In our scenario - 2 tasks/requests and 1 item/agent
The code above drops the second request, and sets tasks to 1
We then loop tasks and agents:
for ( my $i = 0 ; $i < $num_agents ; $i++ ) {
for ( my $j = $r ; $j < $num_tasks ; $j++ ) {
But since we have dcereased things above, we only check the first task/request
- the second hold, which should be filled, is never checked
--
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/