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 <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Tomás Cohen Arazi 2023-06-13 10:48:14 -03:00
parent 0f1b048b5d
commit f32fe0d39c
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F

View file

@ -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(