[Koha-bugs] [Bug 16671] Wrong itemtype picked in HoldsQueue.t

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Jun 28 15:40:04 CEST 2016


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16671

--- Comment #12 from Marcel de Rooy <m.de.rooy at rijksmuseum.nl> ---
Created attachment 52921
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52921&action=edit
Bug 16671: (bug 14828 follow-up) Pick the right itemtypes

Looking at commit aafe73eefb5151454fa8957bf188768324d23955
  Bug 14828: Use Koha::ItemType[s] everywhere C4::ItemType was used
-my @item_types = C4::ItemType->all;
-my @for_loan = grep { $_->{notforloan} == 0 } @item_types
-  or BAIL_OUT("No adequate itemtype");
-my $itemtype = $for_loan[0]->{itemtype};
+my $itemtype = Koha::ItemTypes->search({ notforloan => 1 })->next;
+$itemtype or BAIL_OUT("No adequate itemtype"); #FIXME Should be $itemtype =
$itemtype->itemtype

It seems that the tests expect itemtypes for loan.

Test plan:
  prove t/db_dependent/HoldsQueue.t
should still return green

Signed-off-by: Hector Castro <hector.hecaxmmx at gmail.com>
Works as advertised. No qa test tool errors

Signed-off-by: Marcel de Rooy <m.de.rooy at rijksmuseum.nl>
Adding follow-up.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list