Bug 10311 - Holds queue ignores item-level holds where only one items exists

If a record has only one item, and that item has one item-level hold on
it, that hold will not show in the holds queue.

Test Plan:
1) Create 1 record with 1 item at BranchA
2) Create an item-level hold for that item, for pickup at BranchA by a
   patron of BranchA
3) Run build_holds_queue.pl
4) View the holds queue for BranchA
5) Note the hold is not in there
6) Apply this patch
7) Re-run build_holds_queue.pl
8) View the holds queue again
9) Not that the hold is now there

Signed-off-by: George Williams <georgew@latahlibrary.org>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit acd4b21c91)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This commit is contained in:
Kyle M Hall 2013-05-22 09:52:40 -04:00 committed by Tomas Cohen Arazi
parent 46296f1e3e
commit c500fbb9e2
1 changed files with 1 additions and 1 deletions

View File

@ -406,7 +406,7 @@ sub MapItemsToHoldRequests {
push @{ $items_by_branch{ $item->{holdingbranch} } }, $item
unless exists $allocated_items{ $item->{itemnumber} };
}
return unless keys %items_by_branch;
return \%item_map unless keys %items_by_branch;
# now handle the title-level requests
$num_items_remaining = scalar(@$available_items) - scalar(keys %allocated_items);