We missed adding the public_read_list routine to Koha::Ticket somewhere along the line. We need said list to prevent a 500 response from the POST /api/v1/public/tickets endpoint which is used by the OPAC for adding catalog concerns.
Created attachment 164960 [details] [review] Bug 36612: Unit test for public ticket add
Created attachment 164961 [details] [review] 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."
Created attachment 165268 [details] [review] 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 <david@davidnind.com>
Created attachment 165269 [details] [review] Bug 36612: Unit test for public ticket add Signed-off-by: David Nind <david@davidnind.com>
Created attachment 165270 [details] [review] 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 <david@davidnind.com>
Pushed for 24.05! Well done everyone, thank you!
The combination of bug 35616 and this bug introduces failures in the new tests introduced here. Working on the fix now.
Created attachment 166261 [details] [review] Bug 36612: (QA follow-up) Add 'source' to public_read_list This patch adds the required 'source' field to the public_read_list for tickets.
Pushed to 23.11.x for 23.11.06
Backported to 23.05.x for upcoming 23.05.12.