Bug 27807: (QA follow-up) Unique values only
This patch filters the final _order_by clause such that we only have unique data fields present and we take the first occurence of a field. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
548562ca17
commit
8424f402be
|
|
@ -640,9 +640,9 @@ jQuery.fn.dataTable.ext.errMode = function(settings, note, message) {
|
|||
var order_by = options.columns[order_col].data;
|
||||
order_by = order_by.split(':');
|
||||
var order_dir = e.dir == 'asc' ? '+' : '-';
|
||||
orderArray.push(order_by.map(x => order_dir + (!x.includes('.')?'me.'+x:x)).join(','));
|
||||
Array.prototype.push.apply(orderArray,order_by.map(x => order_dir + (!x.includes('.')?'me.'+x:x)));
|
||||
});
|
||||
dataSet._order_by = orderArray.join(',');
|
||||
dataSet._order_by = orderArray.filter((v, i, a) => a.indexOf(v) === i).join(',');
|
||||
}
|
||||
|
||||
return dataSet;
|
||||
|
|
|
|||
Loading…
Reference in New Issue