From 755bed636710f78c6088ebb4015f7cb21d77cab5 Mon Sep 17 00:00:00 2001 From: Matt Blenkinsop Date: Wed, 12 Jun 2024 13:36:42 +0000 Subject: [PATCH] Bug 37076: Fix incorrect needsconfirmation code This patch corrects two instances of RESERVED_WAITING to RESERVE_WAITING Test plan: 1) Navigate to system preferences and search for AllowItemsOnHoldCheckoutSCO 2) Observe from the description that the correct status code is RESERVE_WAITING 3) Search the repository for RESERVED_WAITING - you should find two instances, one in Checkouts.pm and one in checkout.js 4) Apply patch 5) Repeat step 3 - there should be 0 instances --- Koha/REST/V1/Checkouts.pm | 2 +- koha-tmpl/opac-tmpl/bootstrap/js/modals/checkout.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Koha/REST/V1/Checkouts.pm b/Koha/REST/V1/Checkouts.pm index c1b874f35d..301369a45c 100644 --- a/Koha/REST/V1/Checkouts.pm +++ b/Koha/REST/V1/Checkouts.pm @@ -120,7 +120,7 @@ sub _check_availability { # Upgrade some confirmations to blockers my @should_block = - qw/TOO_MANY ISSUED_TO_ANOTHER RESERVED RESERVED_WAITING TRANSFERRED PROCESSING AGE_RESTRICTION/; + qw/TOO_MANY ISSUED_TO_ANOTHER RESERVED RESERVE_WAITING TRANSFERRED PROCESSING AGE_RESTRICTION/; for my $block (@should_block) { if ( exists( $confirmation->{$block} ) ) { $impossible->{$block} = $confirmation->{$block}; diff --git a/koha-tmpl/opac-tmpl/bootstrap/js/modals/checkout.js b/koha-tmpl/opac-tmpl/bootstrap/js/modals/checkout.js index 9495d02ee4..9c9ece5c0f 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/js/modals/checkout.js +++ b/koha-tmpl/opac-tmpl/bootstrap/js/modals/checkout.js @@ -25,7 +25,7 @@ $(document).ready(function() { result += _("Your account is currently in debt by '%s'").format(data); } else if (code == 'ISSUED_TO_ANOTHER') { result += _("This item appears to be checked out to another patron, please return it to the desk"); - } else if (code == 'RESERVED' || code == 'RESERVED_WAITING') { + } else if (code == 'RESERVED' || code == 'RESERVE_WAITING') { result += _("This item appears to be on hold for another patron, please return it to the desk"); } else if (code == 'TOO_MANY') { result += _("You have reached the maximum number of checkouts allowed on your account"); -- 2.39.3 (Apple Git-146)