From 0f05cc43954494c48d94ec5717d445c7d427cde5 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Tue, 1 Aug 2023 16:40:03 -0300 Subject: [PATCH] Bug 34024: (QA follow-up) Allow pickup location changing for in transit holds Signed-off-by: Tomas Cohen Arazi Signed-off-by: Martin Renvoize Signed-off-by: Tomas Cohen Arazi (cherry picked from commit a05dff84ebae55b0c02538c2689b9c3eaa6b9484) Signed-off-by: Fridolin Somers (cherry picked from commit 7293368dfe508b03180499b16753ef48eaf2a4f6) Signed-off-by: Pedro Amorim --- Koha/REST/V1/Holds.pm | 1 - t/db_dependent/api/v1/holds.t | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Koha/REST/V1/Holds.pm b/Koha/REST/V1/Holds.pm index 93e48c07e4..514aa34fba 100644 --- a/Koha/REST/V1/Holds.pm +++ b/Koha/REST/V1/Holds.pm @@ -542,7 +542,6 @@ sub update_pickup_location { my $error_code = $hold->is_waiting ? 'hold_waiting' - : $hold->is_in_transit ? 'hold_in_transit' : $hold->is_in_processing ? 'hold_in_processing' : undef; diff --git a/t/db_dependent/api/v1/holds.t b/t/db_dependent/api/v1/holds.t index abb7f35f45..245e5e6a09 100755 --- a/t/db_dependent/api/v1/holds.t +++ b/t/db_dependent/api/v1/holds.t @@ -1419,8 +1419,8 @@ subtest 'PUT /holds/{hold_id}/pickup_location tests' => sub { $t->put_ok( "//$userid:$password@/api/v1/holds/" . $in_transit_hold->id - . "/pickup_location" => json => { pickup_library_id => $library_2->branchcode } )->status_is(409) - ->json_is( { error => q{Cannot change pickup location}, error_code => 'hold_in_transit' } ); + . "/pickup_location" => json => { pickup_library_id => $library_2->branchcode } )->status_is(200) + ->json_is( { pickup_library_id => $library_2->branchcode } ); $schema->storage->txn_rollback; }; -- 2.39.5