[Koha-bugs] [Bug 24191] Sorting doesn't use to_model

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Dec 10 09:07:56 CET 2019


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

Josef Moravec <josef.moravec at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #96119|0                           |1
        is obsolete|                            |

--- Comment #10 from Josef Moravec <josef.moravec at gmail.com> ---
Created attachment 96135
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=96135&action=edit
Bug 24191: Make objects.search pass to_model to dbic_merge_sorting

This patch makes objects.search pass the to_mode method reference so it
can be used to map API attributes to column names when building the
sorting portion of the query.

To test:
1. Apply the regression tests on this patchset
2. Run:
  $ kshell
 k$ prove t/db_dependent/Koha/REST/Plugin/Objects.t
=> FAIL: Tests fail!
3. Apply the rest of the patchset
4. Run:
 k$ prove t/Koha/REST/Plugin/Query.t
=> SUCCESS: Tests pass! changes to the methods work as expected!
5. Run:
 k$ prove t/db_dependent/Koha/REST/Plugin/Objects.t
=> SUCCESS: Tests pass!
6. Sign off :-D

Sponsored-by: ByWater Solutions

Signed-off-by: Owen Leonard <oleonard at myacpl.org>

Signed-off-by: Josef Moravec <josef.moravec at gmail.com>

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


More information about the Koha-bugs mailing list