From 7eb9807334135ab8554f6789f71357567a93bc63 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. Signed-off-by: David Nind Signed-off-by: Martin Renvoize Signed-off-by: Katrin Fischer --- Koha/ILL/Request.pm | 1 + ill/ill-requests.pl | 1 + 2 files changed, 2 insertions(+) diff --git a/Koha/ILL/Request.pm b/Koha/ILL/Request.pm index 3816271f0e..49050abd90 100644 --- a/Koha/ILL/Request.pm +++ b/Koha/ILL/Request.pm @@ -2158,6 +2158,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 3d7744ca56..fa514eb369 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::ILL::Requests->find($params->{illrequest_id}); my $backend_result = $request->check_out($params); $template->param( -- 2.39.2