Item8722: TablePlugin sorts dates alphabetically if some cells are empty

Priority: Normal
Current State: Closed
Released In: 1.1.0
Target Release: minor
Applies To: Extension
Component: TablePlugin
Reported By: KennethLavrsen
Waiting For:
Last Change By: KennethLavrsen
After a very recent update to TablePlugin fixing a sorting issue with decimal number we now have introduced a new problem.

Before the change a column with dates where some of the cells were empty would sort so first all the empty cells were listed followed by the dates sorted as dates

The rows with the empty cells would sort more or less randomly but they would always come before the cells with dates.

After the change the column with empty cells is regarded as text strings and the sort happens alphabetically.

Here is an actual example. The project manager in question has always had the dates sorted by the forecast column. When a milestone is reached the date is moved to the actual column leaving more and more cells in the forecast empty.

Milestone Plan Forecast Actual
Doc Input 12 Sep 2007   12 Sep 2007
Doc Plan 26 Sep 2007   26 Sep 2007
Management Decision 10 Oct 2007   10 Oct 2007
Q Plan 10 Oct 2007   30 Nov 2007
Management Review 12 Oct 2007   12 Oct 2007
Senior Management Babble 17 Oct 2007 13 Dec 2007  
SW: Test 1 13 Dec 2007 12 Dec 2007  
SW: Test 2 11 Jan 2008 11 Jan 2008  
Internal test 11 Jan 2008 11 Jan 2008  
Upgrade stuff 11 Jan 2008 11 Jan 2008  
Test more stuff 01 Feb 2008 01 Feb 2008  
Stuff tested and integrated 21 Mar 2008 21 Mar 2008  
Upgrade next version 21 Mar 2008 21 Mar 2008  
Test next version 11 Apr 2008 11 Apr 2008  
Write more doccu 05 May 2008 05 May 2008  
Next version tested 11 Apr 2008 11 Apr 2008  
SW: Final version 16 May 2008 16 May 2008  
SW: Final final version 30 May 2008 30 May 2008  
Build release 09 Jun 2008 09 Jun 2008  
Upload release 20 Jun 2008 20 Jun 2008  
Some Start Milestone 13 Jun 2007   14 Sep 2007

Normally we would sort by planned but in this case the dates have crossed over a lot so the PM prefers the sort by forecast.

That worked OK until 2 days ago when I upgraded our TablePlugin.

It would be better if the

  • Empty cells in a row of random strings is sorted like an empty string (which is the case today)
  • Empty cells in a row of numbers are sorted so empty means "infinite negative" ie. before all numbers, which would make it consistant with numbers and dates
  • Empty cells in a row of dates are sorted so empty means epoch 0 (before any modern date)
  • Empty cell rows are sorted within themselves as they appear in the raw input table (nice to have). This would make a better chance that those rows are not in total random order.

-- KennethLavrsen - 17 Mar 2010

The previous version of table plugin would stop sorting as soon as the column type was ambivalent: mixed dates and strings or empty cells. The update on trunk makes it possible to have cells of different type mixed.

Please give an example that illustrates the problem you are seeing.

-- ArthurClemens - 17 Mar 2010

I had written "here is an example - but forgotten to paste in the example I had in the paste buffer. I am getting old. I have added it up in the original description.

-- KennethLavrsen - 17 Mar 2010

It seems this site has a plugin version that does not do this either.

I have a merlin.lavrsen.dk installation I call timewarp which I use to jump between versions. It is currently at the 1.0.9 release version. And on this it sorts like it did here at the office until I upgraded.

http://merlin.lavrsen.dk/timewarp/bin/view/Myweb/ScheduleTableTest

-- KennethLavrsen - 17 Mar 2010

OK. trunk version works fine. Only the release version needs a tweak.

-- ArthurClemens - 17 Mar 2010

This will not get fixed in 1.0 scope.

I am changing target to 1.1 (minor) and setting it to WaitingForRelease

-- KennethLavrsen - 22 Jul 2010
 

ItemTemplate edit

Summary TablePlugin sorts dates alphabetically if some cells are empty
ReportedBy KennethLavrsen
Codebase 1.0.9, trunk
SVN Range
AppliesTo Extension
Component TablePlugin
Priority Normal
CurrentState Closed
WaitingFor
Checkins
TargetRelease minor
ReleasedIn 1.1.0
Topic revision: r6 - 04 Oct 2010, KennethLavrsen
 
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. see CopyrightStatement. Creative Commons License