プロジェクト

全般

プロフィール

Vote #62855

完了

Sort order for files confusing when end dates the same

Admin Redmine さんが約4年前に追加. 約4年前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
-
対象バージョン:
開始日:
2008/03/15
期日:
進捗率:

0%

予定工数:
category_id:
0
version_id:
1
issue_org_id:
864
author_id:
475
assigned_to_id:
0
comments:
2
status_id:
5
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

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.


journals

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

--------------------------------------------------------------------------------

Admin Redmine さんが約4年前に更新

  • 対象バージョン0.7_1 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0