[Koha-bugs] [Bug 19004] Koha/Patrons.t fails when item-level_itypes is not set

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Aug 25 17:28:25 CEST 2017


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

--- Comment #9 from Jonathan Druart <jonathan.druart at bugs.koha-community.org> ---
Comment on attachment 66038
  --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=66038
[SIGNED-OFF] [SIGNED-OFF] Bug 19004: Adjust AddReturn for retrieving item type

Review of attachment 66038:
 --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=19004&attachment=66038)
-----------------------------------------------------------------

::: C4/Circulation.pm
@@ +1822,5 @@
>  
>      my $itemnumber = $item->{ itemnumber };
> +    my $itemtype = C4::Context->preference("item-level_itypes")
> +        ? $item->{itype}
> +        : Koha::Biblioitems->find( $item->{biblioitemnumber} )->itemtype;

Was this code correct?
Sorry if this is silly, but I am lacking time at the moment to take a look
correctly:
Why do not we just get $item->{itype} as the item-level_itypes is checked in
GetItem (via Koha::Item->effective_itemtype)?

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


More information about the Koha-bugs mailing list