Bug 18985 - SQL reports 'Last edit' and 'Last run' columns sort alphabetically, not chronologically

This patch alters the DataTables configuration of the SQL reports list
so that date columns are identified via class rather than position.

To test, apply the patch and go to Reports -> Use saved.

Test the re-ordering of the creation date, last edit, and last run
columns. Each should sort correctly based on the date.

Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 3304c7c4ca)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
Owen Leonard 2017-08-01 17:07:33 +00:00 committed by Fridolin Somers
parent 8818b60469
commit bda46fb9f2
1 changed files with 5 additions and 7 deletions

View File

@ -94,10 +94,8 @@ $("#delColumn").on("click",function(){
'aoColumnDefs': [
{ 'bSortable': false, 'bSearchable':false, 'aTargets': [0, -1] },
{ 'bSearchable': false, 'aTargets': [3] },
{ "aTargets": [ 1, 2 ], "sType": "natural" }
],
"aoColumns": [
null,null,null,null,null,null,null,null,{ "sType": "title-string" },null,null,null,[% IF (usecache) %]null,[% END %]null,null[% IF has_obsolete_reports %],null[% END %]
{ "aTargets": [ 1, 2 ], "sType": "natural" },
{ "sType": "title-string", "aTargets" : [ "title-string" ] }
],
'oLanguage': {
'sZeroRecords': _("No matching reports found")
@ -374,9 +372,9 @@ canned reports and writing custom SQL reports.</p>
<th>Subgroup</th>
<th>Notes</th>
<th>Author</th>
<th>Creation date</th>
<th>Last edit</th>
<th>Last run</th>
<th class="title-string">Creation date</th>
<th class="title-string">Last edit</th>
<th class="title-string">Last run</th>
<th>Public</th>
[% IF (usecache) %] <th>Cache expiry (seconds)</th> [% END %]
<th>Saved results</th>