[Koha-bugs] [Bug 27680] New: 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
Thu Feb 11 13:27:21 CET 2021
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27680
Bug ID: 27680
Summary: API DataTables Wrapper fails for ordering on
multi-data-field columns
Change sponsored?: ---
Product: Koha
Version: master
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P5 - low
Component: Architecture, internals, and plumbing
Assignee: koha-bugs at lists.koha-community.org
Reporter: martin.renvoize at ptfs-europe.com
QA Contact: testopia at bugs.koha-community.org
We can make a single column contain data from multiple 'data' points in the
ajax response using a mixture of a render function and concatenating the data
points with ':' in the data field. This allows for a nice display and
searching to work.. but the ordering call fails :(
The final patch on bug 26273 highlights this:
{
"data": "manager.firstname:manager.surname",
"searchable": true,
"orderable": true,
"render": function(data, type, row, meta) {
var fullname = row.manager.firstname + " " + row.manager.surname;
return fullname;
}
},
Assuming manager.firstname = 'Bob' and manager.surname = 'Geldoff'.. we will
display "Bob Geldoff". Searching for 'Bob' will add a suitable search header
searching for 'Bob' in both 'manager.firstname' and 'manager.surname' fields..
but hitting order by on this column will result in a 500 error as we add
'_order_by: +manager.firstname:manager.surname' to the query parameters.
--
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