[Koha-bugs] [Bug 29464] GET /acquisitions/orders doesn't honour sorting

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Dec 10 14:24:36 CET 2021


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29464

--- Comment #5 from Tomás Cohen Arazi <tomascohen at gmail.com> ---
Created attachment 128396
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=128396&action=edit
Bug 29464: Make GET /acquisitions/orders honour sorting

When bug 20212 was pushed, we lost (didn't dig enough to find out how)
the sorting feature for this route.

This is mainly because biblio+biblioitems filtering prevents the route
to use plain $c->objects->search, so it has baked a custom version of
it. In this case, it missed the call to the dbic_merge_sorting helper,
that takes care of reading the query parameters and inject the sorting
attributes to the resultset.

To test:
1. Apply the regression tests patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/api/v1/acquisitions_orders.t
=> FAIL: Tests fail, sorting doesn't actually work
3. Apply this patch
4. Repeat 2
=> SUCCESS: Sorting works!
5. Test sorting the pending orders on parcel.tt
6. Sign off :-D

Sponsored-by: ByWater Solutions

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list