Bugzilla – Attachment 164373 Details for
Bug 33568
Use the REST API to display items on the staff biblio detail view
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33568: POD fixes
Bug-33568-POD-fixes.patch (text/plain), 3.49 KB, created by
Jonathan Druart
on 2024-04-03 07:42:13 UTC
(
hide
)
Description:
Bug 33568: POD fixes
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2024-04-03 07:42:13 UTC
Size:
3.49 KB
patch
obsolete
>From cd70da6bcff2aab911c11cfc6a8cfddeaed4ce68 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Thu, 28 Mar 2024 12:20:10 -0300 >Subject: [PATCH] Bug 33568: POD fixes >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> > >Signed-off-by: Laurence Rault <laurence.rault@biblibre.com> >Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> >Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io> >--- > Koha/Item.pm | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++- > 1 file changed, 61 insertions(+), 1 deletion(-) > >diff --git a/Koha/Item.pm b/Koha/Item.pm >index 0a955df7e5c..3e1447d2ffe 100644 >--- a/Koha/Item.pm >+++ b/Koha/Item.pm >@@ -502,6 +502,14 @@ sub item_group { > return $item_group; > } > >+=head3 item_group_item >+ >+ my $item_group_item = $item->item_group_item; >+ >+Return the item group for this item >+ >+=cut >+ > sub item_group_item { > my ( $self ) = @_; > my $rs = $self->_result->item_group_item; >@@ -792,6 +800,23 @@ sub get_transfer { > return Koha::Item::Transfer->_new_from_dbic($transfer) if $transfer; > } > >+=head3 transfer >+ >+ my $transfer = $item->transfer; >+ >+Returns the active transfer request. Returns I<undef> if no active transfer >+is found. >+ >+Note: Transfers are retrieved in a Modified FIFO (First In First Out) order >+whereby the most recently sent, but not received, transfer will be returned >+if it exists, otherwise the oldest unsatisfied transfer will be returned. >+ >+This allows for transfers to queue, which is the case for stock rotation and >+rotating collections where a manual transfer may need to take precedence but >+we still expect the item to end up at a final location eventually. >+ >+=cut >+ > sub transfer { > return shift->get_transfer(@_); > } >@@ -1078,6 +1103,14 @@ sub current_holds { > return Koha::Holds->_new_from_dbic($hold_rs); > } > >+=head3 first_hold >+ >+ my $first_hold = $item->first_hold; >+ >+Returns the first I<Koha::Hold> for the item. >+ >+=cut >+ > sub first_hold { > my ( $self ) = @_; > return $self->current_holds->next; >@@ -1769,7 +1802,7 @@ sub to_api_mapping { > > my $itemtype = $item->itemtype; > >- Returns Koha object for effective itemtype >+Returns Koha object for effective itemtype > > =cut > >@@ -1778,6 +1811,23 @@ sub itemtype { > > return Koha::ItemTypes->find( $self->effective_itemtype ); > } >+ >+=head3 item_type >+ >+ my $item_type = $item->item_type; >+ >+Returns the effective I<Koha::ItemType> 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; > } >@@ -2389,6 +2439,16 @@ sub is_denied_renewal { > return 0; > } > >+=head3 analytics_count >+ >+ my $analytics_count = $item->analytics_count; >+ >+Return the related analytic records count. >+ >+It returns 0 if I<EasyAnalyticalRecords> is disabled. >+ >+=cut >+ > sub analytics_count { > my ($self) = @_; > return C4::Items::GetAnalyticsCount($self->itemnumber); >-- >2.34.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 33568
:
151339
|
153791
|
164308
|
164309
|
164310
|
164311
|
164312
|
164313
|
164314
|
164315
|
164316
|
164317
|
164318
|
164319
|
164320
|
164321
|
164322
|
164323
|
164324
|
164325
|
164326
|
164327
|
164328
|
164329
|
164330
|
164331
|
164332
|
164333
|
164334
|
164335
|
164336
|
164337
|
164338
|
164339
|
164340
|
164341
|
164342
|
164343
|
164344
|
164345
|
164346
|
164347
|
164348
|
164349
|
164350
|
164351
|
164352
|
164353
|
164354
|
164355
|
164356
|
164358
|
164359
|
164360
|
164361
|
164362
|
164363
|
164364
|
164365
|
164366
|
164367
|
164368
|
164369
|
164370
|
164371
|
164372
|
164373
|
164374
|
164472
|
164480
|
164482
|
164483
|
164485
|
164528