Bug 39846 - Holds Queue Local Holds Priority checks items after an item has been allocated
Summary: Holds Queue Local Holds Priority checks items after an item has been allocated
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Hold requests (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-05-06 20:30 UTC by Lisette Scheer
Modified: 2025-05-06 20:30 UTC (History)
1 user (show)

See Also:
GIT URL:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lisette Scheer 2025-05-06 20:30:48 UTC
foreach my $request (@$hold_requests) {
...
                foreach my $item (@$available_items) {
...
                    if ($local_hold_match) 
                        if (    exists $items_by_itemnumber{ $item->{itemnumber} }
                            and not exists $allocated_items{ $item->{itemnumber} }
                            and not $request->{allocated} )
                        {


This code checks each item for local holds priority and then goes to the next item if request is already allocated, but we should check earlier in the loop and go to the next request if the first one is already filled.