From 19a01846ec146fe312a819a3024373b8010de314 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 Signed-off-by: Esther --- Koha/Item.pm | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/Koha/Item.pm b/Koha/Item.pm index 03e2d0794ad..b8189f425a3 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