Koha-clms/C4
Nick Clemens 3f61f6088f
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>
2025-09-19 08:42:43 -06:00
..
AuthoritiesMarc Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
Barcodes Bug 39367: Manual changes 2025-04-23 09:35:15 +02:00
ClassSortRoutine Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
ClassSplitRoutine Bug 40388: Remove warning from t/Labels.t 2025-07-18 11:09:51 -06:00
Creators Bug 39325: Automatic fix 2025-04-28 18:51:22 +02:00
External Bug 39834: Replace some tabs with spaces 2025-06-02 15:26:17 -06:00
Form Bug 34776: Add unit tests for sub restore_form_values 2025-06-30 08:30:51 -06:00
Heading Bug 39415: (follow-up) Add 651g to bib heading fields as well 2025-05-06 18:48:18 +02:00
ILSDI Bug 39325: Automatic fix 2025-04-28 18:51:22 +02:00
Installer Bug 39367: Manual changes 2025-04-23 09:35:15 +02:00
Labels Bug 34157: Exporting labels as a barcode range can cause 500 error 2025-07-15 16:32:52 -06:00
Linker Bug 39367: Manual changes 2025-04-23 09:35:15 +02:00
Members Bug 39325: Automatic fix 2025-04-28 18:51:22 +02:00
OAI Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
Output Bug 39367: Automatic changes 2025-04-23 09:35:14 +02:00
Patroncards Bug 39367: Manual changes 2025-04-23 09:35:15 +02:00
Reports Bug 39325: Manual fixes 2025-04-28 18:51:23 +02:00
SIP Bug 39820: Add cancellation reason and clean up cancellation request 2025-09-05 08:02:29 -06:00
Search Bug 39367: Manual changes 2025-04-23 09:35:15 +02:00
Serials Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
Utils/DataTables Bug 39427: Searching lists table by owner can only enter firstname or surname 2025-08-01 13:22:38 -06:00
Accounts.pm Bug 39325: Automatic fix 2025-04-28 18:51:22 +02:00
Acquisition.pm Bug 39325: Automatic fix 2025-04-28 18:51:22 +02:00
Auth.pm Bug 40275: Use Koha::Patrons->find_by_identifier in the codebase 2025-09-03 14:00:46 -06:00
Auth_cas_servers.yaml.sample
…
Auth_with_cas.pm Bug 40275: Use Koha::Patrons->find_by_identifier in the codebase 2025-09-03 14:00:46 -06:00
Auth_with_ldap.pm Bug 39834: Replace some tabs with spaces 2025-06-02 15:26:17 -06:00
Auth_with_shibboleth.pm Bug 39367: Manual changes 2025-04-23 09:35:15 +02:00
AuthoritiesMarc.pm Bug 40119: (QA follow-up) Small additional comment 2025-06-13 13:21:37 -06:00
Barcodes.pm Bug 39834: Replace some tabs with spaces 2025-06-02 15:26:17 -06:00
Biblio.pm Bug 38619: UNIMARC prices should also be extracted from 071d 2025-08-14 16:05:46 -06:00
Breeding.pm Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
Budgets.pm Bug 39834: Replace some tabs with spaces 2025-06-02 15:26:17 -06:00
Calendar.pm Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
Charset.pm Bug 39834: Replace some tabs with spaces 2025-06-02 15:26:17 -06:00
Circulation.pm Bug 40708: Return the specific error to the checkin page 2025-09-19 08:42:43 -06:00
ClassSortRoutine.pm Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
ClassSource.pm Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
ClassSplitRoutine.pm Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
Context.pm Bug 39325: Automatic fix 2025-04-28 18:51:22 +02:00
Contract.pm Bug 39325: Automatic fix 2025-04-28 18:51:22 +02:00
CourseReserves.pm Bug 39367: Automatic changes 2025-04-23 09:35:14 +02:00
Creators.pm Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
HTML5Media.pm Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
Heading.pm Bug 38729: Linker should consider diacritics 2025-04-14 08:50:57 +02:00
HoldsQueue.pm Bug 40620: Holds Queue will assign to the lowest item number if multiple branches have the same transport cost 2025-08-22 07:45:01 -06:00
ImportBatch.pm Bug 39367: Automatic changes 2025-04-23 09:35:14 +02:00
ImportExportFramework.pm Bug 39325: Automatic fix 2025-04-28 18:51:22 +02:00
InstallAuth.pm Bug 39325: Automatic fix 2025-04-28 18:51:22 +02:00
Installer.pm Bug 39325: Automatic fix 2025-04-28 18:51:22 +02:00
ItemCirculationAlertPreference.pm Bug 39367: Automatic changes 2025-04-23 09:35:14 +02:00
Items.pm Bug 23010: Handle error in C4/Items.pm using try/catch 2025-06-24 16:10:21 -06:00
Koha.pm Bug 40277: Remove warn in C4::Koha::GetAuthorisedValues() 2025-07-07 10:20:27 -06:00
Labels.pm Bug 21395: Make perlcritic happy 2020-06-29 12:37:02 +02:00
Languages.pm Bug 39325: Tidy 2025-04-28 18:51:27 +02:00
Letters.pm Bug 38997: Remove outdated developer doc 2025-08-14 16:05:47 -06:00
Linker.pm Bug 39367: Automatic changes 2025-04-23 09:35:14 +02:00
Log.pm Bug 39325: Automatic fix 2025-04-28 18:51:22 +02:00
MarcModificationTemplates.pm Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
Matcher.pm Bug 39325: Automatic fix 2025-04-28 18:51:22 +02:00
Members.pm Bug 37418: delete_patrons.pl: Exclude patrons with restrictions 2025-04-25 08:46:53 +02:00
Message.pm Bug 39367: Automatic changes 2025-04-23 09:35:14 +02:00
Output.pm Bug 39367: Manual changes 2025-04-23 09:35:15 +02:00
Overdues.pm Bug 39405: (follow-up) Add the parameter borrowernumber to the overwrite_calc_fine plugin hook 2025-04-25 08:46:49 +02:00
Patroncards.pm Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
Record.pm Bug 39834: Replace some tabs with spaces 2025-06-02 15:26:17 -06:00
Reports.pm Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
Reserves.pm Bug 40636: (follow-up) Cache the calendar object 2025-09-05 08:02:32 -06:00
Ris.pm Bug 39367: Automatic changes 2025-04-23 09:35:14 +02:00
RotatingCollections.pm Bug 39325: Automatic fix 2025-04-28 18:51:22 +02:00
SMS.pm Bug 39325: Automatic fix 2025-04-28 18:51:22 +02:00
Scheduler.pm Bug 39325: Automatic fix 2025-04-28 18:51:22 +02:00
Scrubber.pm Bug 40079: (follow-up) Improve test coverage and fix undef handling 2025-06-30 08:30:44 -06:00
Search.pm Bug 37883: (follow-up) Increment counts correctly 2025-07-23 16:36:45 -06:00
Serials.pm Bug 39834: Replace some tabs with spaces 2025-06-02 15:26:17 -06:00
Service.pm Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
ShelfBrowser.pm Bug 39834: Replace some tabs with spaces 2025-06-02 15:26:17 -06:00
SocialData.pm Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
Stats.pm Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
Suggestions.pm Bug 39325: Automatic fix 2025-04-28 18:51:22 +02:00
TTParser.pm Bug 39325: Automatic fix 2025-04-28 18:51:22 +02:00
Tags.pm Bug 39834: Replace some tabs with spaces 2025-06-02 15:26:17 -06:00
Templates.pm Bug 39367: Automatic changes 2025-04-23 09:35:14 +02:00
TmplToken.pm Bug 39367: Automatic changes 2025-04-23 09:35:14 +02:00
TmplTokenType.pm Bug 39367: Automatic changes 2025-04-23 09:35:14 +02:00
UsageStats.pm Bug 39325: Automatic fix 2025-04-28 18:51:22 +02:00
XISBN.pm Bug 39367: Automatic changes 2025-04-23 09:35:14 +02:00
XSLT.pm Bug 39367: Automatic changes 2025-04-23 09:35:14 +02:00