Bug 17978: Check if hold can be placed before placing on placerequest.pl
To test: 1 - Set an All/All/All rule with reserves limited 2 to 2 - Search in the staff side 3 - Select all records (or more than 2) from the results 4 - Click 'Place hold' 5 - Find a patron, place holds 6 - You get more holds than you should 7 - Delete those holds 8 - Apply patch 9 - Search and select more than 2 records 10 - Find patron, place holds 11 - Only 2 holds are placed Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This commit is contained in:
parent
d7a5925aa0
commit
fa53eb4cfa
|
|
@ -97,14 +97,18 @@ if ( $type eq 'str8' && $borrower ) {
|
|||
|
||||
if ($multi_hold) {
|
||||
my $bibinfo = $bibinfos{$biblionumber};
|
||||
AddReserve($branch,$borrower->{'borrowernumber'},$biblionumber,[$biblionumber],
|
||||
$bibinfo->{rank},$startdate,$expirationdate,$notes,$bibinfo->{title},$checkitem,$found);
|
||||
if ( CanBookBeReserved($borrower->{'borrowernumber'}, $biblionumber)->{status} eq 'OK' ) {
|
||||
AddReserve($branch,$borrower->{'borrowernumber'},$biblionumber,[$biblionumber],
|
||||
$bibinfo->{rank},$startdate,$expirationdate,$notes,$bibinfo->{title},$checkitem,$found);
|
||||
}
|
||||
} else {
|
||||
# place a request on 1st available
|
||||
for ( my $i = 0 ; $i < $holds_to_place_count ; $i++ ) {
|
||||
AddReserve( $branch, $borrower->{'borrowernumber'},
|
||||
$biblionumber, \@realbi, $rank[0], $startdate, $expirationdate, $notes, $title,
|
||||
$checkitem, $found, $itemtype );
|
||||
if ( CanBookBeReserved($borrower->{'borrowernumber'}, $biblionumber)->{status} eq 'OK' ) {
|
||||
AddReserve( $branch, $borrower->{'borrowernumber'},
|
||||
$biblionumber, \@realbi, $rank[0], $startdate, $expirationdate, $notes, $title,
|
||||
$checkitem, $found, $itemtype );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue