Bugzilla – Attachment 125235 Details for
Bug 29105
Add effective_item_type_id to the API items responses
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29105: Add effective_itemtype handling for Item API
Bug-29105-Add-effectiveitemtype-handling-for-Item-.patch (text/plain), 926 bytes, created by
Martin Renvoize (ashimema)
on 2021-09-24 11:19:50 UTC
(
hide
)
Description:
Bug 29105: Add effective_itemtype handling for Item API
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2021-09-24 11:19:50 UTC
Size:
926 bytes
patch
obsolete
>From 1c1d4c2f75e3fb2b5c52175bde739a834ba80777 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Fri, 24 Sep 2021 12:19:12 +0100 >Subject: [PATCH] Bug 29105: Add effective_itemtype handling for Item API > >--- > Koha/Item.pm | 14 ++++++++++++++ > 1 file changed, 14 insertions(+) > >diff --git a/Koha/Item.pm b/Koha/Item.pm >index 60d80a5c3eb..98d154badea 100644 >--- a/Koha/Item.pm >+++ b/Koha/Item.pm >@@ -1104,6 +1104,20 @@ sub _set_found_trigger { > return $self; > } > >+=head3 to_api >+ >+Overloaded to_api method to ensure item-level itypes is adhered to. >+ >+=cut >+ >+sub to_api { >+ my ($self, $params) = @_; >+ >+ $self->iteype( $self->effective_itemtype ); >+ $self->notforloan( $self->itemtype->notforloan ) unless $self->notforloan; >+ return $self->SUPER::to_api($params); >+} >+ > =head3 to_api_mapping > > This method returns the mapping for representing a Koha::Item object >-- >2.20.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 29105
:
125235
|
125251
|
125252
|
137504
|
137505
|
137572
|
137573