https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31557 Christopher Brannon <cbrannon@cdalibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |cbrannon@cdalibrary.org --- Comment #13 from Christopher Brannon <cbrannon@cdalibrary.org> --- (In reply to Nick Clemens from comment #12)
So, this is slightly confusing to explain.
We group all the possible items by their holding branch ( $items_by_branch variable ) 554 push @{ $items_by_branch{ $item->{holdingbranch} } }, $item
Then we get all the items that are held at the hold's pickup location ( here we fall back to the borrowers branch if there is no hold pickup location, but a hold must have a pickuplocation, so it's moot) 568 my $pickup_branch = $request->{branchcode} || $request->{borrowerbranch} 571 my $holding_branch_items = $items_by_branch{$pickup_branch};
And set the priority value: 572 my $priority_branch = C4::Context->preference('HoldsQueuePrioritizeBranch') // 'homebranch';
Then we will assign the hold to the first item where: $request->{borrowerbranch} eq $item->{$priority_branch} and the hold is allowed
So we are already in the subset of items where the holding branch matches the pickup branch, and then we give priority to patrons from the holding branch, or patrons from the owning branch.
I would be wonderful if we had flowcharts for these types of things. Many of us are visual learners. Flowcharts, man! :) -- You are receiving this mail because: You are watching all bug changes.