Lines 153-158
$requesters{'CPL'} = AddMember(
Link Here
|
153 |
categorycode => 'PT', |
153 |
categorycode => 'PT', |
154 |
surname => 'borrower from CPL', |
154 |
surname => 'borrower from CPL', |
155 |
); |
155 |
); |
|
|
156 |
for my $i ( 2 .. 5 ) { |
157 |
$requesters{"CPL$i"} = AddMember( |
158 |
branchcode => 'CPL', |
159 |
categorycode => 'PT', |
160 |
surname => 'borrower $i from CPL', |
161 |
); |
162 |
} |
156 |
$requesters{'FPL'} = AddMember( |
163 |
$requesters{'FPL'} = AddMember( |
157 |
branchcode => 'FPL', |
164 |
branchcode => 'FPL', |
158 |
categorycode => 'PT', |
165 |
categorycode => 'PT', |
Lines 389-399
ModReserveAffect( $itemnumber, $requesters{'CPL'} , 0); #confirm hold
Link Here
|
389 |
is(defined $results[3]?1:0, 1, 'GetReservesFromItemnumber returns a future wait (confirmed future hold)'); |
396 |
is(defined $results[3]?1:0, 1, 'GetReservesFromItemnumber returns a future wait (confirmed future hold)'); |
390 |
# End of tests for bug 9788 |
397 |
# End of tests for bug 9788 |
391 |
|
398 |
|
|
|
399 |
$dbh->do("DELETE FROM reserves WHERE biblionumber=?",undef,($bibnum)); |
392 |
# Tests for CalculatePriority (bug 8918) |
400 |
# Tests for CalculatePriority (bug 8918) |
393 |
my $p = C4::Reserves::CalculatePriority($bibnum2); |
401 |
my $p = C4::Reserves::CalculatePriority($bibnum2); |
394 |
is($p, 4, 'CalculatePriority should now return priority 4'); |
402 |
is($p, 4, 'CalculatePriority should now return priority 4'); |
395 |
$resdate=undef; |
403 |
$resdate=undef; |
396 |
AddReserve('CPL', $requesters{'CPL'}, $bibnum2, |
404 |
AddReserve('CPL', $requesters{'CPL2'}, $bibnum2, |
397 |
$constraint, $bibitems, $p, $resdate, $expdate, $notes, |
405 |
$constraint, $bibitems, $p, $resdate, $expdate, $notes, |
398 |
$title, $checkitem, $found); |
406 |
$title, $checkitem, $found); |
399 |
$p = C4::Reserves::CalculatePriority($bibnum2); |
407 |
$p = C4::Reserves::CalculatePriority($bibnum2); |
Lines 412-418
ModReserveAffect( $itemnumber, $requesters{'CPL'} , 0);
Link Here
|
412 |
$p = C4::Reserves::CalculatePriority($bibnum); |
420 |
$p = C4::Reserves::CalculatePriority($bibnum); |
413 |
is($p, 1, 'CalculatePriority should now return priority 1'); |
421 |
is($p, 1, 'CalculatePriority should now return priority 1'); |
414 |
#add another biblio hold, no resdate |
422 |
#add another biblio hold, no resdate |
415 |
AddReserve('CPL', $requesters{'CPL'}, $bibnum, |
423 |
AddReserve('CPL', $requesters{'CPL2'}, $bibnum, |
416 |
$constraint, $bibitems, $p, $resdate, $expdate, $notes, |
424 |
$constraint, $bibitems, $p, $resdate, $expdate, $notes, |
417 |
$title, $checkitem, $found); |
425 |
$title, $checkitem, $found); |
418 |
$p = C4::Reserves::CalculatePriority($bibnum); |
426 |
$p = C4::Reserves::CalculatePriority($bibnum); |
Lines 421-427
is($p, 2, 'CalculatePriority should now return priority 2');
Link Here
|
421 |
C4::Context->set_preference('AllowHoldDateInFuture', 1); |
429 |
C4::Context->set_preference('AllowHoldDateInFuture', 1); |
422 |
$resdate= dt_from_string(); |
430 |
$resdate= dt_from_string(); |
423 |
$resdate->add_duration(DateTime::Duration->new(days => 1)); |
431 |
$resdate->add_duration(DateTime::Duration->new(days => 1)); |
424 |
AddReserve('CPL', $requesters{'CPL'}, $bibnum, |
432 |
AddReserve('CPL', $requesters{'CPL3'}, $bibnum, |
425 |
$constraint, $bibitems, $p, output_pref($resdate), $expdate, $notes, |
433 |
$constraint, $bibitems, $p, output_pref($resdate), $expdate, $notes, |
426 |
$title, $checkitem, $found); |
434 |
$title, $checkitem, $found); |
427 |
$p = C4::Reserves::CalculatePriority($bibnum); |
435 |
$p = C4::Reserves::CalculatePriority($bibnum); |
428 |
- |
|
|