Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
http://drupal.org/project/usage/views
The table is sorted like so:
6.x-2.x-dev
6.x-2.1
6.x-2.0-rc5
6.x-2.0-rc4
...
6.x-2.0-beta4
6.x-2.0-beta3
...
6.x-2.0 // Wait, what?
5.x-1.x-dev
It would make more sense if it were:
6.x-2.x-dev
6.x-2.1
6.x-2.0 // Move this to the top.
6.x-2.0-rc5
6.x-2.0-rc4
...
I guess maybe sort by node ID desc for multiple things in the same release?
Comments
Comment #1
dwwThat's the SQL sort order. This is tablesort_sql(). The default sort column is the release node title, and that's what ORDER BY gives you. :( I don't see how to change this ordering without making the entire thing non-sortable. It's nice to be able to click on the "Oct 12" column and see this view of the same data:
http://drupal.org/project/usage/views?sort=desc&order=Oct+12
I don't know how to trick tablesort_sql() into thinking that I want the default sort to JOIN on {term_node} tn and {term_data} td, and do ORDER BY td.name DESC, tn.nid DESC. Those queries are evil and expensive enough already (though I guess since we're caching the whole page already, making them even more insane isn't that big a deal).
I suppose we could do something crazy like if there's no sort goo in the URL, and we're doing the default sort on version strings, we could do some crazy PHP sorting of rows we get back from the DB before we put them in the table, but that seems like a huge hassle, potentially buggy, and I'm not sure it's worth it.
So, I'm tempted to mark this "by design", unless someone comes up with another cleaner solution.
Comment #2
drewish CreditAttribution: drewish commentedthis is really annoying. i was getting confused about why people were using old versions of my modules.
as dww noted, the queries are pretty tacky right now. i think we could replicate some of the work that happens in tablesort_sql() and add a special case.
Comment #3
Pasquallewhat about sorting it by release date
Comment #4
dwwPasqualle: That's probably going to be worse, with 5.x, 6.x and 7.x releases interwoven.
Comment #5
drummI can still reproduce this.