Lines 48-53
my $library3 = $builder->build({
Link Here
|
48 |
source => 'Branch', |
48 |
source => 'Branch', |
49 |
}); |
49 |
}); |
50 |
|
50 |
|
|
|
51 |
$dbh->do("DELETE FROM reserves"); |
52 |
$dbh->do("DELETE FROM issues"); |
53 |
$dbh->do("DELETE FROM items"); |
54 |
$dbh->do("DELETE FROM biblio"); |
55 |
$dbh->do("DELETE FROM biblioitems"); |
56 |
$dbh->do("DELETE FROM transport_cost"); |
57 |
$dbh->do("DELETE FROM tmp_holdsqueue"); |
58 |
$dbh->do("DELETE FROM hold_fill_targets"); |
59 |
$dbh->do("DELETE FROM default_branch_circ_rules"); |
60 |
$dbh->do("DELETE FROM default_branch_item_rules"); |
61 |
$dbh->do("DELETE FROM default_circ_rules"); |
62 |
$dbh->do("DELETE FROM branch_item_rules"); |
63 |
|
51 |
my $TITLE = "Test Holds Queue XXX"; |
64 |
my $TITLE = "Test Holds Queue XXX"; |
52 |
|
65 |
|
53 |
my $borrower = $builder->build({ |
66 |
my $borrower = $builder->build({ |
Lines 75-81
$dbh->do("UPDATE systempreferences SET value = ? WHERE variable = 'StaticHoldsQu
Link Here
|
75 |
join( ',', @other_branches, $borrower_branchcode, $least_cost_branch_code)); |
88 |
join( ',', @other_branches, $borrower_branchcode, $least_cost_branch_code)); |
76 |
$dbh->do("UPDATE systempreferences SET value = '0' WHERE variable = 'RandomizeHoldsQueueWeight'"); |
89 |
$dbh->do("UPDATE systempreferences SET value = '0' WHERE variable = 'RandomizeHoldsQueueWeight'"); |
77 |
|
90 |
|
78 |
$dbh->do("DELETE FROM transport_cost"); |
|
|
79 |
my $transport_cost_insert_sth = $dbh->prepare("insert into transport_cost (frombranch, tobranch, cost) values (?, ?, ?)"); |
91 |
my $transport_cost_insert_sth = $dbh->prepare("insert into transport_cost (frombranch, tobranch, cost) values (?, ?, ?)"); |
80 |
# Favour $least_cost_branch_code |
92 |
# Favour $least_cost_branch_code |
81 |
$transport_cost_insert_sth->execute($borrower_branchcode, $least_cost_branch_code, 0.2); |
93 |
$transport_cost_insert_sth->execute($borrower_branchcode, $least_cost_branch_code, 0.2); |
Lines 109-116
foreach ( $borrower_branchcode, $least_cost_branch_code, @other_branches ) {
Link Here
|
109 |
$items_insert_sth->execute($barcode++, $_, $borrower_branchcode); |
121 |
$items_insert_sth->execute($barcode++, $_, $borrower_branchcode); |
110 |
} |
122 |
} |
111 |
|
123 |
|
112 |
# Remove existing reserves, makes debugging easier |
|
|
113 |
$dbh->do("DELETE FROM reserves"); |
114 |
my $bibitems = undef; |
124 |
my $bibitems = undef; |
115 |
my $priority = 1; |
125 |
my $priority = 1; |
116 |
# Make a reserve |
126 |
# Make a reserve |
117 |
- |
|
|