Project

General

Profile

Actions

Defect #864

closed

Sort order for files confusing when end dates the same

Added by John Goerzen about 16 years ago. Updated almost 16 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
Start date:
2008-03-15
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

Hi,

Back in defect #763 (and r1192), I submitted a patch that changed the sort order for files to put the most recent release at the top. All it did was add ".reverse" to the end of this line:

    @versions = @project.versions.sort.reverse

It appears that project.versions sorts by date, not by name. That is not necessarily the problem. But it is a problem when multiple versions have the same end date. The net result of that, in the above situation, is that within a given date, the projects sort approximately ascending (oldest first), but between multiple dates, they sort descending (newest first), as desired. I say "approximately ascending" because there are a few versions that are out of place, both in the Roadmap screen and the Files screen.

As I'm importing files from Trac, I happen to be setting up a bunch of versions with today's end date.

I have no idea why this is happening, but if I were to venture a guess, I'd say Ruby has a feature where a custom sort ordering can be imposed on a type, and versions sort order is creating this behavior.

Actions #1

Updated by Jean-Philippe Lang about 16 years ago

  • Status changed from New to Resolved
  • Target version set to 0.7
  • Resolution set to Fixed

No particular order was set for versions with the same date (in Version#<=>).
Now versions with the same date are sorted by name (r1296).

Actions #2

Updated by Jean-Philippe Lang almost 16 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF