Bugzilla – Attachment 164961 Details for
Bug 36612
The public tickets endpoint needs public fields list
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36612: Add public_read_list to Koha::Ticket
Bug-36612-Add-publicreadlist-to-KohaTicket.patch (text/plain), 1.48 KB, created by
Martin Renvoize (ashimema)
on 2024-04-16 17:50:12 UTC
(
hide
)
Description:
Bug 36612: Add public_read_list to Koha::Ticket
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2024-04-16 17:50:12 UTC
Size:
1.48 KB
patch
obsolete
>From 3691edfba1461673189957b449dbaef931c845fb Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Tue, 16 Apr 2024 18:22:41 +0100 >Subject: [PATCH] Bug 36612: Add public_read_list to Koha::Ticket > >Without the public_read_list to define which fields should be accessible >from the public endpoints we will always return a 500 from the API on >otherwise successfull additions of tickets via the OPAC. > >Test plan >1) Enable OPACCatalogConcerns >2) Login to the OPAC and "Report a concern" >3) Note the error message in the UI "There was an error when submitting > your concern, please contact a librarian." >4) Confirm that the concern is actually created regardless >5) Apply the patch here and restart plack >6) Submit another 'Report a concern' and now note the success message > "Your concern was successfully submitted." >--- > Koha/Ticket.pm | 14 ++++++++++++++ > 1 file changed, 14 insertions(+) > >diff --git a/Koha/Ticket.pm b/Koha/Ticket.pm >index 83b84bc97e3..6a5f2c56411 100644 >--- a/Koha/Ticket.pm >+++ b/Koha/Ticket.pm >@@ -168,6 +168,20 @@ sub store { > > =cut > >+=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 [ >+ 'ticket_id', 'title', 'body', >+ 'reporter_id', 'reported_date', 'resolved_date', >+ 'biblio_id' >+ ]; >+} >+ > =head3 to_api_mapping > > This method returns the mapping for representing a Koha::Ticket object >-- >2.44.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 36612
:
164960
|
164961
|
165268
|
165269
|
165270
|
166261