Bugzilla – Attachment 117686 Details for
Bug 27855
Allow embedding extended_attributes on /patrons routes
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27855: Implement Koha::Patron::Attribute->to_api_mapping
Bug-27855-Implement-KohaPatronAttribute-toapimappi.patch (text/plain), 1.28 KB, created by
Martin Renvoize (ashimema)
on 2021-03-04 11:41:40 UTC
(
hide
)
Description:
Bug 27855: Implement Koha::Patron::Attribute->to_api_mapping
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2021-03-04 11:41:40 UTC
Size:
1.28 KB
patch
obsolete
>From beb2bac41604cdaa1670a9c3e8f81aeb79c341db Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Wed, 3 Mar 2021 16:51:41 -0300 >Subject: [PATCH] Bug 27855: Implement Koha::Patron::Attribute->to_api_mapping > >This patch introduces a mapping to render extended attributes on the >API. As they have an ID, and they will generally be used on the >/patrons umbrella, I removed the borrowernumber on the mapping. > >Another option would be to add the field, but make it optional. It >really feels redundant, so I take it out for now. > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > Koha/Patron/Attribute.pm | 15 +++++++++++++++ > 1 file changed, 15 insertions(+) > >diff --git a/Koha/Patron/Attribute.pm b/Koha/Patron/Attribute.pm >index 5afd674149..115b7bad46 100644 >--- a/Koha/Patron/Attribute.pm >+++ b/Koha/Patron/Attribute.pm >@@ -112,6 +112,21 @@ sub description { > return $self->attribute; > } > >+=head3 to_api_mapping >+ >+This method returns the mapping for representing a Koha::Patron::Attribute object >+on the API. >+ >+=cut >+ >+sub to_api_mapping { >+ return { >+ id => 'extended_attribute_id', >+ attribute => 'value', >+ borrowernumber => undef, >+ code => 'type' >+ }; >+} > > =head2 Internal methods > >-- >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 27855
:
117660
|
117661
|
117662
|
117663
|
117681
|
117682
|
117683
|
117684
|
117685
|
117686
|
117687
|
117688
|
117689
|
117690
|
117691
|
117692
|
117693
|
117694
|
117695