#2209 closed enhancement (fixed)
Sort milestones by completed date and due date
Reported by: | anonymous | Owned by: | Remy Blank |
---|---|---|---|
Priority: | normal | Milestone: | 0.11.2 |
Component: | roadmap | Version: | 0.9b2 |
Severity: | minor | Keywords: | patch |
Cc: | remy.blank@… | Branch: | |
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
Currently, the milestones are sorted by due date on the roadmap and in custom queries when grouped by milestone. If some of the milestones have a due date and others do not, the sort is not as desired for completed milestones. The completed date should be used for the sort rather then the due date for completed milestones.
A workaround at the moment is to enter a due date the same as the completed date for those milestones without a due date. It is inconvenient to remember to do that, but workable.
Attachments (2)
Change History (21)
comment:1 by , 19 years ago
Milestone: | → 0.9.1 |
---|---|
Status: | new → assigned |
comment:2 by , 19 years ago
Milestone: | 0.9.1 → 0.9.2 |
---|
comment:3 by , 19 years ago
Milestone: | 0.9.3 → 0.9.4 |
---|
follow-up: 15 comment:4 by , 19 years ago
comment:5 by , 19 years ago
Milestone: | 0.9.4 → 0.10 |
---|
comment:12 by , 18 years ago
Milestone: | 0.10 → 0.11 |
---|---|
Status: | assigned → new |
Ah well, postponing again.
comment:13 by , 17 years ago
Priority: | low → normal |
---|
comment:14 by , 16 years ago
Query/filter functionality is a good idea. For possible uses see also bug #7342
by , 16 years ago
Attachment: | 2209-query-sort-milestone-r7439.patch added |
---|
Patch against 0.11-stable fixing sorting by milestone in queries
comment:15 by , 16 years ago
Cc: | added |
---|---|
Keywords: | patch added |
Replying to cboos:
What's left to be done is something similar for the query module, when the tickets are grouped by Milestones.
The patch above fixes sorting of query results by milestone, by applying the same sort order as used in the roadmap. The only exception is that it doesn't use the natural sort order when comparing the milestone names (if both completed
and due
are equal). If anybody knows how to perform a natural sort in SQL, please let me know.
The patch also refactors the query sort code to simplify the SQL construction and removing unnecessary duplication.
by , 16 years ago
Attachment: | 2209-query-sort-milestone-r7443.patch added |
---|
Same patch, additionally fixed test cases
comment:16 by , 16 years ago
I had forgotten to run the test suite. The second patch also fixes the test cases.
comment:17 by , 16 years ago
Milestone: | 0.11.3 → 0.11.2 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Patch applied in [7483].
comment:18 by , 16 years ago
Owner: | changed from | to
---|
comment:19 by , 13 years ago
This works for me in the case of normal ticket queries. However, it does not work for SQL reports (despite the predefined SQL reports, such as 'Active Tickets by Milestone', suggesting it should). The milestones are instead ordered lexicographically, e.g. '1.10' before '1.9' before '2.0.0'.
Example: http://tahoe-lafs.org/trac/tahoe-lafs/report/20
I don't mind if I have to use more complicated SQL to achieve the same sort order as the normal queries, but what SQL should I use?
See r2758 for a description of the new Milestone sort order implemented for the roadmap.
What's left to be done is something similar for the query module, when the tickets are grouped by Milestones.