[#649] Docman : sorting documents by dates doesn't work

Description

Summary:

Detailed description

In docman, the sorting by dates doesn't work. The sorting is alphabetical, so it's not OK with french date format.

It's not expected that dates are on JJ/MM/AAAA HH:MM format in "sortable.js" file. (but only JJ/MM/AAAA, without hours and minutes)


A possible correction in "src/www/js/sortable.js" file:

Add in "ts_resortTable" function this test :

if (itm.match("^(0[1-9]|[12][0-9]|3[01])/(0[1-9]|1[012])/[0-9]{4} ([01][0-9]|2[0-3]):([0-5][0-9])$")) sortfn = tssortdate;

Add in "sort_date" function this code : else if (date.length == 16) { if (europeandate == false) { dt = date.substr(6,4)+date.substr(0,2)+date.substr(3,2)+date.substr(11,5); return dt; } else { dt = date.substr(6,4)+date.substr(3,2)+date.substr(0,2)+date.substr(11,5); return dt; } }

General Information
Submitted by:
Matthieu DURAND
Date Submitted: 2014-03-25 14:08
Last Modified by: Nobody
Last Modified: 2017-11-02 20:00
Date Closed: 2014-03-26 09:16
Permalink: https://fusionforge.org/tracker/a_follow.php/649
Actions
Internal Fields
Data Type: Bugs
Assigned to: Franck Villaume (nerville)
State: Closed
Priority: 3
Extra Fields
Resolution:
Fixed
Severity:
minor
Target Release:
5.3
Follow-up tabs
Message  ↓
Date: 2014-03-26 09:16
Sender: Franck Villaume

branch53 : fix in commit 7d020680c7cbfa0e6a0a3a2e86ecb6000b6a3992

Date: 2014-03-26 09:01
Sender: Franck Villaume

solution : use sorttable_customkey

No attached documents

No related commits.

Field Old Value Date By
status_idOpen2014-03-26 09:16
Franck Villaume
close_dateNone2014-03-26 09:16
Franck Villaume
assigned_tonone2014-03-26 09:16
Franck Villaume
Target ReleaseNone2014-03-26 09:16
Franck Villaume
ResolutionNone2014-03-26 09:16
Franck Villaume
Target Release5.32014-03-26 08:42
Franck Villaume

No relations found.