From f32fe0d39c88a55d5c6d95a2f6850714adb19ffa Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Tue, 13 Jun 2023 10:48:14 -0300 Subject: [PATCH] Bug 33971: Remove x-koha-query handing in Orders.pm This patch removes manual handling of `x-koha-query` in the Orders:list() controller. There are no tests for the feature but you can verify no behavior is changed by doing: 1. Run: $ ktd --shell k$ prove t/db_dependent/api/v1/acquisitions_orders.t => SUCCESS: Tests pass 2. Apply this patch 3. Repeat 1 => SUCCESS: Tests pass 4. Sign off :-D Signed-off-by: Jonathan Druart Signed-off-by: Martin Renvoize Signed-off-by: Tomas Cohen Arazi --- Koha/REST/V1/Acquisitions/Orders.pm | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/Koha/REST/V1/Acquisitions/Orders.pm b/Koha/REST/V1/Acquisitions/Orders.pm index bb12ed0a53..d0bdb40fd2 100644 --- a/Koha/REST/V1/Acquisitions/Orders.pm +++ b/Koha/REST/V1/Acquisitions/Orders.pm @@ -133,8 +133,7 @@ sub list { } if ( defined $reserved_params->{q} - || defined $reserved_params->{query} - || defined $reserved_params->{'x-koha-query'} ) + || defined $reserved_params->{query} ) { $filtered_params //={}; @@ -151,12 +150,6 @@ sub list { if $q; # skip if exists but is empty } - # x-koha-query contains a string - push @query_params_array, - $json->decode( - $c->table_name_fixer( $reserved_params->{'x-koha-query'} ) ) - if $reserved_params->{'x-koha-query'}; - # query is already decoded by JSON::Validator at this point push @query_params_array, $json->decode( -- 2.39.5