• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Item6031: TablePlugin: Date sorting is broken.

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Extension TablePlugin Urgent Closed   patch 4.3.0

Edit Form Data

Summary:
Reported By:
Codebase:
Applies To:
Component:
Priority:
Current State:
Waiting For:
Target Release:
Released In:
 

Detail

Title Date Size Span dateSorted ascending
MNO 06 Feb 2006 - 19:02 3.4 K 06 Feb 2006 - 19:02
DEF 07 Feb 2006 - 13:23 0.2 K 07 Feb 2006 - 13:23
ABC 26 May 2007 - 22:36 5.6 K 26 May 2007 - 22:36
GHI 26 Jul 2007 - 13:23 0.2 K 26 Jul 2007 - 13:23
JKL 16 Sep 2008 - 09:48 10.2 K 16 Sep 2008 - 09:48

This should sort by date. Instead it sorts alphabetically, so May 2007 is listed after July 2007.

http://twiki.org/cgi-bin/view/Support/TableSortingbyDateDoesntWork

-- TWiki:Main/MartinCleaver - 30 Sep 2008

? I can't see the problem in the table above. Maybe I need new glasses or am getting old.

-- TWiki:Main.FranzJosefGigler - 30 Sep 2008

The attachment table is wrong: http://twiki.org/cgi-bin/view/Sandbox/AttachmentTest?sortcol=4;table=1;up=1#sorted_table

-- TWiki:Main.ArthurClemens - 30 Sep 2008

http://twiki.org/cgi-bin/view/Sandbox/AttachmentTest?sortcol=3;table=1;up=0#sorted_table As you can see, it's not only tables, but sizes also are bugged.

Updating the table above to ensure it works if not in an Attachment.

  • In fact, it's normal that it doesn't work like this for sizes, but imho, it should for the attachment table

Ok, Attachment tables generate some span tag to avoid wrapping, which is not caught by the code which transforms dates into values:

 <span class="twikiNoBreak">26 May 2007 - 22:36</span>
-- TWiki:Main.OlivierRaginel - 30 Sep 2008

Probably the sorting code does not strip out the html tags.

Confirmed: removing <span class"twikiNoBreak"></span> from attachtables.tmpl fixes the sorting.

The problem is that the column is defined as text, not a date column. So the html is being stripped out, but it is too late.

Working on it now.

-- TWiki:Main.ArthurClemens - 30 Sep 2008

Fixed. Free as in beer.

-- TWiki:Main.ArthurClemens - 30 Sep 2008

Awesome smile Thanks.

-- TWiki:Main.MartinCleaver - 30 Sep 2008

I'm reopening this, cause TWikirev:17547 makes trunk to die if there is a column that has number and text (on different cells), like the one at Item5880: http://develop.twiki.org/~twiki4/cgi-bin/view/Bugs/Item5880?sortcol=1;table=3;up=0#sorted_table

-- TWiki:Main.GilmarSantosJr - 01 Oct 2008

Fixed this now.

-- TWiki:Main.ArthurClemens - 01 Oct 2008

Had this really been related to TablePlugin or was this a core bug? Anyway it should be part of the next bug release!

-- TWiki:Main.FranzJosefGigler - 02 Oct 2008

This was a TablePlugin bug. The column got defined as text, not as date column.

-- TWiki:Main.ArthurClemens - 02 Oct 2008

I reopened this only to commit a minor fix to make tests work on TWikiRelease04x02

-- TWiki:Main.GilmarSantosJr - 04 Oct 2008

ItemTemplate
Summary TablePlugin: Date sorting is broken.
ReportedBy TWiki:Main.MartinCleaver
Codebase 4.2.1, 4.2.2
SVN Range TWiki-5.0.0, Tue, 23 Sep 2008, build 17539
AppliesTo Extension
Component TablePlugin
Priority Urgent
CurrentState Closed
WaitingFor

Checkins TWikirev:17546 TWikirev:17547 TWikirev:17557 TWikirev:17558 TWikirev:17566
TargetRelease patch
ReleasedIn 4.3.0
Edit | Attach | Watch | Print version | History: r23 < r22 < r21 < r20 < r19 | Backlinks | Raw View |  Raw edit | More topic actions
Topic revision: r23 - 2009-04-08 - PeterThoeny
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2023 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback