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

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Jun 6 15:00:42 CEST 2016


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 at gmail.com
          Reporter: jonathan.druart at bugs.koha-community.org
        QA Contact: testopia at 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.


More information about the Koha-bugs mailing list