When returning an item that has an item-level hold on it,
CheckReserves() will not consider it waiting unless the
priority has been set to 0 (i.e., the item has specifically
been marked as filling the request.)
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
foreach my $res (@reserves) {
# FIXME - $item might be undefined or empty: the caller
# might be searching by barcode.
- if ( $res->{'itemnumber'} == $item ) {
+ if ( $res->{'itemnumber'} == $item && $res->{'priority'} == 0) {
# Found it
return ( "Waiting", $res );
}