Bugzilla – Attachment 117506 Details for
Bug 27807
API DataTables Wrapper fails for ordered on multiple columns
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27807: (QA follow-up) Unique values only
Bug-27807-QA-follow-up-Unique-values-only.patch (text/plain), 1.65 KB, created by
Martin Renvoize (ashimema)
on 2021-03-02 11:52:58 UTC
(
hide
)
Description:
Bug 27807: (QA follow-up) Unique values only
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2021-03-02 11:52:58 UTC
Size:
1.65 KB
patch
obsolete
>From 635698cffa47c89b03430f310064ce9957dea478 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Tue, 2 Mar 2021 11:19:42 +0000 >Subject: [PATCH] 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. >--- > koha-tmpl/intranet-tmpl/prog/js/datatables.js | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/datatables.js b/koha-tmpl/intranet-tmpl/prog/js/datatables.js >index 25373b9306..d47081cd5c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/datatables.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/datatables.js >@@ -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; >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 27807
:
117502
|
117504
|
117506
|
117514
|
117515
|
118825
|
118826