@@ -, +, @@ --- Koha/Item.pm | 12 +++++++ Koha/REST/V1/Biblios.pm | 1 + Koha/Serial/Item.pm | 13 ++++++++ api/v1/swagger/definitions/item.yaml | 4 +++ api/v1/swagger/paths/biblios.yaml | 1 + .../prog/en/modules/catalogue/detail.tt | 32 ++++++++++++++----- 6 files changed, 55 insertions(+), 8 deletions(-) --- a/Koha/Item.pm +++ a/Koha/Item.pm @@ -51,6 +51,7 @@ use Koha::Plugins; use Koha::Recalls; use Koha::Result::Boolean; use Koha::SearchEngine::Indexer; +use Koha::Serial::Items; use Koha::StockRotationItem; use Koha::StockRotationRotas; use Koha::TrackedLinks; @@ -444,6 +445,17 @@ sub checkout { return Koha::Checkout->_new_from_dbic( $checkout_rs ); } +=head3 serialitem + +=cut + +sub serialitem { + my ( $self ) = @_; + my $rs = $self->_result->serialitem; + return unless $rs; + return Koha::Serial::Item->_new_from_dbic($rs); +} + =head3 item_group my $item_group = $item->item_group; --- a/Koha/REST/V1/Biblios.pm +++ a/Koha/REST/V1/Biblios.pm @@ -302,6 +302,7 @@ sub get_items { my $items_rs = $biblio->items; $items_rs = $items_rs->filter_by_bookable if $bookable_only; + # FIXME We need to order_by serial.publisheddate if we have _order_by=+me.serial_issue_number my $items = $c->objects->search($items_rs); return $c->render( status => 200, --- a/Koha/Serial/Item.pm +++ a/Koha/Serial/Item.pm @@ -24,6 +24,8 @@ use Koha::Database; use base qw(Koha::Object); +use Koha::Serials; + =head1 NAME Koha::Serial::Item - Koha Serial Item Object class @@ -34,6 +36,17 @@ Koha::Serial::Item - Koha Serial Item Object class =cut +=head3 serial + +=cut + +sub serial { + my ($self) = @_; + my $rs = $self->_result->serialid; + return unless $rs; + return Koha::Serial->_new_from_dbic($rs); +} + =head3 type =cut --- a/api/v1/swagger/definitions/item.yaml +++ a/api/v1/swagger/definitions/item.yaml @@ -238,6 +238,10 @@ properties: type: - object - "null" + serialitem: + type: + - object + - "null" _strings: type: - object --- a/api/v1/swagger/paths/biblios.yaml +++ a/api/v1/swagger/paths/biblios.yaml @@ -425,6 +425,7 @@ - +strings - cover_image_ids - item_group_item.item_group.description + - serialitem.serial collectionFormat: csv - $ref: "../swagger.yaml#/parameters/match" - $ref: "../swagger.yaml#/parameters/order_by" --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -712,9 +712,7 @@