[Koha-bugs] [Bug 29106] Can we get rid of Koha::Item->effective_itemtype

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Sep 27 08:23:06 CEST 2021


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

--- Comment #1 from Marcel de Rooy <m.de.rooy at rijksmuseum.nl> ---
sub effective_itemtype {
    my ( $self ) = @_;

    my $pref = C4::Context->preference('item-level_itypes');
    if ( $pref && $self->itype() ) {
        return $self->itype();
    } else {
        warn "item-level_itypes set but no itemtype set for item
(".$self->itemnumber.")"
          if $pref;
        return $self->biblioitemnumber()->itemtype();
    }
}

This sub c/should be moved out of the DBIx schema file to Koha::Item ?
There is no need to warn each time imo.

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


More information about the Koha-bugs mailing list