Lines 2-8
Link Here
|
2 |
|
2 |
|
3 |
use Modern::Perl; |
3 |
use Modern::Perl; |
4 |
|
4 |
|
5 |
use Test::More tests => 20; |
5 |
use Test::More tests => 23; |
6 |
use MARC::Record; |
6 |
use MARC::Record; |
7 |
use DateTime::Duration; |
7 |
use DateTime::Duration; |
8 |
|
8 |
|
Lines 191-196
my ($itemnum_cpl, $itemnum_fpl);
Link Here
|
191 |
barcode => 'bug10272_FPL' |
191 |
barcode => 'bug10272_FPL' |
192 |
} , $bibnum2); |
192 |
} , $bibnum2); |
193 |
|
193 |
|
|
|
194 |
# Ensure that priorities are numbered correcly when a hold is moved to waiting |
195 |
# (bug 11947) |
196 |
$dbh->do("DELETE FROM reserves WHERE biblionumber=?",undef,($bibnum2)); |
197 |
AddReserve('RPL', $requesters{'RPL'}, $bibnum2, |
198 |
$constraint, $bibitems, 1, $resdate, $expdate, $notes, |
199 |
$title, $checkitem, $found); |
200 |
AddReserve('FPL', $requesters{'FPL'}, $bibnum2, |
201 |
$constraint, $bibitems, 2, $resdate, $expdate, $notes, |
202 |
$title, $checkitem, $found); |
203 |
AddReserve('CPL', $requesters{'CPL'}, $bibnum2, |
204 |
$constraint, $bibitems, 3, $resdate, $expdate, $notes, |
205 |
$title, $checkitem, $found); |
206 |
ModReserveAffect($itemnum_cpl, $requesters{'RPL'}, 0); |
207 |
|
208 |
# Now it should have different priorities. |
209 |
my ($count, $title_reserves) = GetReservesFromBiblionumber($bibnum2); |
210 |
# Sort by reserve number in case the database gives us oddly ordered results |
211 |
my @reserves = sort { $a->{reserve_id} <=> $b->{reserve_id} } @$title_reserves; |
212 |
is($reserves[0]{priority}, 0, 'Item is correctly waiting'); |
213 |
is($reserves[1]{priority}, 1, 'Item is correctly priority 1'); |
214 |
is($reserves[2]{priority}, 2, 'Item is correctly priority 2'); |
215 |
|
216 |
|
217 |
$dbh->do("DELETE FROM reserves WHERE biblionumber=?",undef,($bibnum2)); |
194 |
AddReserve('RPL', $requesters{'RPL'}, $bibnum2, |
218 |
AddReserve('RPL', $requesters{'RPL'}, $bibnum2, |
195 |
$constraint, $bibitems, 1, $resdate, $expdate, $notes, |
219 |
$constraint, $bibitems, 1, $resdate, $expdate, $notes, |
196 |
$title, $checkitem, $found); |
220 |
$title, $checkitem, $found); |
Lines 291-296
is(
Link Here
|
291 |
my $letter = ReserveSlip('CPL', $requesters{'CPL'}, $bibnum); |
315 |
my $letter = ReserveSlip('CPL', $requesters{'CPL'}, $bibnum); |
292 |
ok(defined($letter), 'can successfully generate hold slip (bug 10949)'); |
316 |
ok(defined($letter), 'can successfully generate hold slip (bug 10949)'); |
293 |
|
317 |
|
|
|
318 |
|
319 |
|
294 |
$dbh->rollback; |
320 |
$dbh->rollback; |
295 |
|
321 |
|
296 |
sub count_hold_print_messages { |
322 |
sub count_hold_print_messages { |
297 |
- |
|
|