No default sort order for tables?

leafish_dylan - November 8, 2005 - 16:28
Project:Extended Tracker
Version:4.6.x-1.x-dev
Component:User interface
Category:feature request
Priority:normal
Assigned:kbahey
Status:closed
Description

First, thanks for this module. Drupal really needs it, IMO.

I'm running the 4.6 version of the module on Drupal CVS from about a month ago. (I'm not going anywhere near the latest CVS because of the form changes).

Tables in this module should default to sorting by date, to show most recent posts first. This seems like an obvious issue, so it may be a bug? If not, it would be a great default to set.

#1

kbahey - November 9, 2005 - 05:45

Hmmm

The sorting is done by the tablesort_query, and it has:

     array('data' => t('Last Post'), 'field' => 'last_post', 'sort' => 'asc')

So, I am not sure if that takes effect initially, or only after someone clicks on it?

#2

leafish_dylan - November 9, 2005 - 14:22

Shouldn't that be 'desc'?

#3

kbahey - November 9, 2005 - 14:23

That is what I was thinking, but it was getting late.

If you can change it locally and test it, and verify it works, I will commit a change for it.

#4

agentrickard - November 9, 2005 - 14:58

Tested on 4.6.3. If you edit line 151 of v1.1 to

      array('data' => t('Last Post'), 'field' => 'last_post', 'sort' => 'desc')

Then the default sort is most recent post.

#5

kbahey - November 9, 2005 - 15:03
Assigned to:Anonymous» kbahey
Status:active» fixed

Commited for 4.6 and HEAD.

Thanks to both of you.

#6

Anonymous - November 23, 2005 - 15:21
Status:fixed» closed
 
 

Drupal is a registered trademark of Dries Buytaert.