]> git.koha-community.org Git - koha.git/commit
Bug 30165: (follow-up) Fix GET /acquisitions/orders
authorTomas Cohen Arazi <tomascohen@theke.io>
Tue, 15 Mar 2022 18:18:22 +0000 (15:18 -0300)
committerKyle Hall <kyle@bywatersolutions.com>
Fri, 25 Mar 2022 13:37:06 +0000 (09:37 -0400)
commit11cd810bef0c6cf2bbb456a5c04e053003b4de87
treed8ce96d2359aca8b17435df3c4b6302839960d9a
parent19c9af400304ac48ab60f3f719eff71024850181
Bug 30165: (follow-up) Fix GET /acquisitions/orders

This patch fixes the particular use case of the orders route, which has
a slightly modified version of the objects.search helped, embeded in the
controller itself. This controller gets adjusted to the fact q will now
be an array.

Because of the latter, we end up requiring more code duplication
regarding the query fix, so I moved it to an internal sub that gets
reused.

To test:
1. Apply the previous patches
2. Run:
   $ kshell
  k$ prove t/db_dependent/api/v1/*
=> FAIL: It t/db_dependent/api/v1/acquisitions_orders.t fails!
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass!
5. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Koha/REST/V1/Acquisitions/Orders.pm