Koha-clms/circ
Nick Clemens 341ce0efc5
Bug 40708: Return the specific error to the checkin page
When implemented, the message here was believed to either be about Duplicate IDs, or guarantor issues.
We are now seeing a wider variety of issues possible from SQL errors, lock timeout or missings rows as examples

This patch adds an 'ErrorMessage' message to the return from AddReturn and displays it to the user.

To test:
1 - Issue an item to a patron, note the itemnumber
2 - On the command line, lock the row:
    sudo koha-mysql kohadev
    START TRANSACTION;
    SELECT * FROM issues WHERE itemnumber=975 FOR UPDATE;
    leave mysql open at this point
3 - On the interface, check in the item, wait a bit
4 - After a bit you get the error to check the config page, but nothing is there
5 - close mysql, apply patch, restart all
6 - Repeat 2
7 - Check in the item, wait a bit
8 - Note you now get the error from the DB:
    Error: (DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Lock wait timeout exceeded; try restarting transaction at /kohadevbox/koha/Koha/Object.pm line 174 )
9 - Sign off!

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 3f61f6088f)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-09-25 16:22:48 +02:00
..
add_message.pl Bug 38095: Include logged-in branch in custom patron message 2025-02-21 16:41:28 +01:00
article-request-slip.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
article-requests.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
bookcount.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
branchoverdues.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
branchtransfers.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
checkout-notes.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
circulation-home.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
circulation.pl Bug 9762: (follow-up) Add branchcode to Log circulation and add some override confirmations in action logs, fix typos 2025-09-20 10:43:26 +02:00
curbside_pickups.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
del_message.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
hold-transfer-slip.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
on-site_checkouts.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
overdue.pl Bug 31167: Only mark due dates in the past red on overdues report 2025-03-21 17:50:27 +01:00
pendingbookings.pl Bug 33736: Add filter for holding library 2024-10-25 11:09:55 +02:00
pendingreserves.pl Bug 40515: Fix regexp for cud-mark_as_lost_and_notify 2025-09-20 10:43:13 +02:00
renew.pl Bug 9762: (Alternative) Handle renewals 2025-09-20 10:43:26 +02:00
request-article.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
reserveratios.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
returns.pl Bug 40708: Return the specific error to the checkin page 2025-09-25 16:22:48 +02:00
set-library.pl Bug 39325: Automatic fix 2025-04-28 18:51:22 +02:00
transfer-slip.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
transfers_to_send.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
transferstoreceive.pl Bug 39834: Replace some tabs with spaces 2025-06-17 21:42:59 +02:00
view_holdsqueue.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
waitingreserves.pl Bug 39834: Replace some tabs with spaces 2025-06-17 21:42:59 +02:00