https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16671 Bug ID: 16671 Summary: Wrong itemtype picked in HoldsQueue.t Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: gmcharlt@gmail.com Reporter: jonathan.druart@bugs.koha-community.org QA Contact: testopia@bugs.koha-community.org
From bug 14828:
-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 (First you are allowed to wonder what this FIXME has not been done...) The wrong itemtypes are picked from the DB, we want itemtypes with notforloan == 0, not 1. -- You are receiving this mail because: You are watching all bug changes.