From 8b056ba683387af9d1cb2bb844f75dd2f33aaa5f Mon Sep 17 00:00:00 2001 From: Martin Renvoize 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." Signed-off-by: David Nind Signed-off-by: Katrin Fischer (cherry picked from commit 834fc10650779c71b6608ab01ef0e54bd9dd4746) Signed-off-by: Fridolin Somers (cherry picked from commit d6cf0250a907def14c55f9582ee170b5fa47ee51) Signed-off-by: Lucas Gass --- Koha/Ticket.pm | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Koha/Ticket.pm b/Koha/Ticket.pm index 83b84bc97e..6a5f2c5641 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.39.5