From 56db09ddc95aaaa83310fd612d895b8e2ace5cb0 Mon Sep 17 00:00:00 2001 From: Thibaud Guillot Date: Wed, 10 Apr 2024 10:21:54 +0200 Subject: [PATCH] Bug 35906: (follow-up) rebased it --- Koha/Item.pm | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/Koha/Item.pm b/Koha/Item.pm index c06fcdfb077..af530a88086 100644 --- a/Koha/Item.pm +++ b/Koha/Item.pm @@ -1812,24 +1812,6 @@ sub itemtype { return Koha::ItemTypes->find( $self->effective_itemtype ); } -=head3 item_type - - my $item_type = $item->item_type; - -Returns the effective I for the item. - -FIXME: it should either return the 'real item type' or undef if no item type -defined. And effective_itemtype should return... the effective itemtype. Right -now it returns an id... This is all inconsistent. And the API should make it clear -if the attribute is part of the resource, or a calculated value i.e. if the item -is not linked to an item type on its own, then the API response should contain -item_type: null! And the effective item type... be another attribute. I understand -that this complicates filtering, but some query trickery could do it in the controller. - -=cut - -sub item_type { - return shift->itemtype; =head3 effective_bookable my $bookable = $item->effective_bookable; -- 2.30.2