Bugzilla – Attachment 152801 Details for
Bug 32711
Add biblio details to trusted self-checkout modal
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32711: Add 'public_read_list' appropriately
Bug-32711-Add-publicreadlist-appropriately.patch (text/plain), 2.86 KB, created by
Martin Renvoize (ashimema)
on 2023-06-28 13:05:30 UTC
(
hide
)
Description:
Bug 32711: Add 'public_read_list' appropriately
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2023-06-28 13:05:30 UTC
Size:
2.86 KB
patch
obsolete
>From 92b6f9d3a1312a3cde01b4a5dd1e0c936311ea1f Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Tue, 24 Jan 2023 15:00:03 +0000 >Subject: [PATCH] Bug 32711: Add 'public_read_list' appropriately > >We're exposing biblio (and thus biblioitem) to the public API now and as >such we need to explisitely list which fields to include in the response >when called on the public api. > >Signed-off-by: Silvia Meakins <smeakins@eso.org> >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > Koha/Biblio.pm | 17 ++++++++++++++++- > Koha/Biblioitem.pm | 21 ++++++++++++++++++++- > 2 files changed, 36 insertions(+), 2 deletions(-) > >diff --git a/Koha/Biblio.pm b/Koha/Biblio.pm >index f8d6fcdff4..eb4d5d3cec 100644 >--- a/Koha/Biblio.pm >+++ b/Koha/Biblio.pm >@@ -1229,6 +1229,21 @@ sub get_marc_authors { > return [@first_authors, @other_authors]; > } > >+=head3 public_read_list >+ >+This method returns the list of publicly readable database fields for both API and UI output purposes >+ >+=cut >+ >+sub public_read_list { >+ return [ >+ 'biblionumber', 'frameworkcode', 'author', >+ 'title', 'medium', 'subtitle', >+ 'part_number', 'part_name', 'unititle', >+ 'notes', 'serial', 'seriestitle', >+ 'copyrightdate', 'abstract' >+ ]; >+} > > =head3 to_api > >@@ -1244,7 +1259,7 @@ sub to_api { > my ($self, $args) = @_; > > my $response = $self->SUPER::to_api( $args ); >- my $biblioitem = $self->biblioitem->to_api; >+ my $biblioitem = $self->biblioitem->to_api( $args ); > > return { %$response, %$biblioitem }; > } >diff --git a/Koha/Biblioitem.pm b/Koha/Biblioitem.pm >index eec0cdc637..9cc3a05ca2 100644 >--- a/Koha/Biblioitem.pm >+++ b/Koha/Biblioitem.pm >@@ -30,6 +30,26 @@ Koha::Biblioitem - Koha Biblioitem Object class > > =head2 Class methods > >+=head3 public_read_list >+ >+This method returns the list of publicly readable database fields for both API and UI output purposes >+ >+=cut >+ >+sub public_read_list { >+ return [ >+ 'volume', 'number', 'isbn', >+ 'issn', 'ean', 'publicationyear', >+ 'publishercode', 'volumedate', 'columedesc', >+ 'collectiontitle', 'collectionissn', 'collectionvolume', >+ 'editionstatement', 'editionresponsibility', 'pages', >+ 'place', 'lccn', 'url', >+ 'cn_source', 'cn_class', 'cn)item', >+ 'cn_suffix', 'cn_sort', 'agerestriction', >+ 'totalissues' >+ ]; >+} >+ > =head3 to_api_mapping > > This method returns the mapping for representing a Koha::Biblioitem object >@@ -57,7 +77,6 @@ sub to_api_mapping { > totalissues => 'serial_total_issues', > volumedate => 'volume_date', > volumedesc => 'volume_description', >- > }; > } > >-- >2.41.0
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 32711
:
145618
|
145619
|
145787
|
145788
|
150984
|
150985
|
150986
|
151262
|
151263
|
151264
|
152800
|
152801
|
152802
|
153468
|
153469
|
153470