From 41675c1688eea1d9f7457ba3cafa1591f0a98ba0 Mon Sep 17 00:00:00 2001 From: Pedro Amorim Date: Mon, 25 Mar 2024 13:23:36 +0000 Subject: [PATCH] Bug 36416: Fix cud-check_out 1) Install FreeForm and enable ILLModule, run: bash <(curl -s https://raw.githubusercontent.com/ammopt/koha-ill-dev/master/start-ill-dev.sh) 2) Checkout to branch b_36243 cd /kohadevbox/koha/Koha/Illbackends/FreeForm git checkout b_36243 3) Enable CirculateILL sys pref 4) Create a new ILL request, visit: /cgi-bin/koha/ill/ill-requests.pl?method=create&backend=FreeForm 5) Set "type" = Book and enter '42' on the cardnumber input, click "Create" 6) On the top toolbar, click "Confirm" and confirm the following screen. 7) You now have a new option "Check out" on the toolbar. Click on it. Notice it explodes. 8) Apply patch. Repeat. --- Koha/Illrequest.pm | 1 + ill/ill-requests.pl | 1 + 2 files changed, 2 insertions(+) diff --git a/Koha/Illrequest.pm b/Koha/Illrequest.pm index b4c8057d570..43d2a7dbad1 100644 --- a/Koha/Illrequest.pm +++ b/Koha/Illrequest.pm @@ -2057,6 +2057,7 @@ sub get_op_param_deprecation { $op = 'cud-generic_confirm' if $op eq 'generic_confirm'; $op = 'cud-cancel' if $op eq 'cancel'; $op = 'cud-delete' if $op eq 'delete'; + $op = 'cud-check_out' if $op eq 'check_out'; } return $op; } diff --git a/ill/ill-requests.pl b/ill/ill-requests.pl index 9087825a0d6..0ed7afb6f6a 100755 --- a/ill/ill-requests.pl +++ b/ill/ill-requests.pl @@ -369,6 +369,7 @@ if ( $backends_available ) { # handle special commit rules & update type handle_commit_maybe($backend_result, $request); } elsif ( $op eq 'cud-check_out') { + $op =~ s/^cud-//; my $request = Koha::Illrequests->find($params->{illrequest_id}); my $backend_result = $request->check_out($params); $template->param( -- 2.30.2