[Koha-bugs] [Bug 27680] API DataTables Wrapper fails for ordering on multi-data-field columns

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Feb 12 20:38:16 CET 2021


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

--- Comment #20 from Martin Renvoize <martin.renvoize at ptfs-europe.com> ---
This is the most pragmatic solution I could come up with.

* We set the datatable wrapper to send _order_by as a comma delimited string of
fields.
* We update the collectionFormat spec to 'csv' from 'pipes'.. pipes was a bad
value to start with as it's 'pipe' and 'csv' is more common.
* We add handling to allow for traditional multiple passed params by name (as
we can't rule them out via validation for some reason so it's nicer to handle
them than it is to throw a nasty serverside error.
* We add notes to some tests that are expected to result in a nasty 500 error.
We cannot prevent arbitrary parameters from being sent to the API (which
includes the _order_by[] PHP style multiple pass option, and non-csv delimited
string options).

Looking for feedback as to whether this is enough.. I'm thinking perhaps we
need to throw a better Koha level exception when catching bad column names in
our query string perhaps?

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


More information about the Koha-bugs mailing list