@@ -, +, @@ 63 my @item_types = C4::ItemType->all; 64 my $itemtype = grep { $_->{notforloan} == 1 } @item_types 65 or BAIL_OUT("No adequate itemtype"); 92 $dbh->do("INSERT INTO biblioitems (biblionumber, marcxml, itemtype) 93 VALUES ($biblionumber, '', '$itemtype')"); 64 my @not_for_loan = grep { $_->{notforloan} == 1 } @item_types 65 or BAIL_OUT("No adequate itemtype"); 66 my $itemtype = $not_for_loan[0]->{itemtype}; Bug 10336: HoldsQueue.t needs to create its own data -my $itemtype = $dbh->selectrow_array("SELECT min(itemtype) FROM itemtypes WHERE notforloan = 0") +my @item_types = C4::ItemType->all; +my $itemtype = grep { $_->{notforloan} == 1 } @item_types --- t/db_dependent/HoldsQueue.t | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/t/db_dependent/HoldsQueue.t +++ a/t/db_dependent/HoldsQueue.t @@ -61,8 +61,9 @@ my @branchcodes = ( $library1->{branchcode}, $library2->{branchcode}, $library3- my @other_branches = ( $library2->{branchcode}, $library3->{branchcode} ); my $least_cost_branch_code = pop @other_branches; my @item_types = C4::ItemType->all; -my $itemtype = grep { $_->{notforloan} == 1 } @item_types +my @for_loan = grep { $_->{notforloan} == 0 } @item_types or BAIL_OUT("No adequate itemtype"); +my $itemtype = $for_loan[0]->{itemtype}; #Set up the stage # Sysprefs and cost matrix --