From 517cae6e795d84b8194ee48ecfe5c68490f3ff27 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 12 Feb 2021 10:53:27 +0100 Subject: [PATCH] Bug 27680: Take first order column for ordering Signed-off-by: Tomas Cohen Arazi --- koha-tmpl/intranet-tmpl/prog/js/datatables.js | 1 + 1 file changed, 1 insertion(+) diff --git a/koha-tmpl/intranet-tmpl/prog/js/datatables.js b/koha-tmpl/intranet-tmpl/prog/js/datatables.js index da01ac8ba03..7d64b907d5c 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/datatables.js +++ b/koha-tmpl/intranet-tmpl/prog/js/datatables.js @@ -637,6 +637,7 @@ jQuery.fn.dataTable.ext.errMode = function(settings, note, message) { order.forEach(function (e,i) { var order_col = e.column; var order_by = options.columns[order_col].data; + order_by = order_by.split(':')[0]; var order_dir = e.dir == 'asc' ? '+' : '-'; dataSet._order_by = order_dir + (!order_by.includes('.')?'me.'+order_by:order_by); }); -- 2.30.1