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

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Dec 9 15:23:56 CET 2019


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

            Bug ID: 24191
           Summary: Sorting doesn't use to_model
 Change sponsored?: ---
           Product: Koha
           Version: master
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P5 - low
         Component: REST API
          Assignee: koha-bugs at lists.koha-community.org
          Reporter: tomascohen at gmail.com

There are no tests for sorting the results from objects.search (there are unit
test for the query building code only) and it is not working as expected, as
objects.search is not using to_model to map the attribute names.

To reproduce:
- Perform the following with your favourite tool:
  GET http://kohadev-intra.myDNSname.org:8081/api/v1/cities?_order_by=+name
=> FAIL: You get a DBIC error about 'name' not being a valid column name

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


More information about the Koha-bugs mailing list