#1038 closed enhancement (fixed)
Support custom milestone ordering.
Reported by: | Owned by: | Christian Boos | |
---|---|---|---|
Priority: | high | Milestone: | 0.9.4 |
Component: | roadmap | Version: | 0.8 |
Severity: | minor | Keywords: | roadmap, milestone, version |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
Should be interesting if roadmap module support ordering using some code to handle alfa, beta, pre and so on.
For example:
1.0 alfa 1.0 pre 1.0
Attachments (4)
Change History (21)
comment:1 by , 20 years ago
comment:2 by , 20 years ago
Severity: | minor → enhancement |
---|
comment:3 by , 20 years ago
Milestone: | 0.9 |
---|---|
Summary: | Should order milestone versions supporting common names like alfa, beta, pre, rc... → Support custom milestone ordering |
Not for 0.9.
comment:4 by , 19 years ago
Milestone: | → 0.10 |
---|---|
Priority: | low → normal |
I think you may want to include this in some milestone, particularly in light of how the Roadmap looks since the addition of the 0.10 - 0.12 milestones. They appear to be scheduled before 0.9.4 which I'm fairly certain is not the intent.
I'm suggesting 0.10 should be the target milestone for this, but I certainly have no idea if that is realistic
comment:5 by , 19 years ago
Owner: | changed from | to
---|---|
Priority: | normal → high |
Severity: | normal → minor |
Natural sort ordering for milestone names?
(as in source:trunk/trac/versioncontrol/web_ui/browser.py@latest#L33)
by , 19 years ago
Attachment: | natural_order_sort_for_milestones.diff added |
---|
Use natural ordering for Milestones in the roadmap view
comment:6 by , 19 years ago
Status: | new → assigned |
---|
See attachment:natural_order_sort_for_milestones.diff
That could be also ported to 0.9-stable, in order to correctly show Trac's own milestones, for the next upgrade.
follow-up: 17 comment:9 by , 19 years ago
Hold on, actually that breaks the ordering by due date.
The ordering should ideally be:
- completed date (already completed first, completed earlier first)
- due date (due date set first, due date earlier first)
- name (natural order)
in that order.
comment:10 by , 19 years ago
See also #2209.
Note that the due date sorting is already performed in the SQL query.
by , 19 years ago
Attachment: | natural_order_sort_for_milestones.2.diff added |
---|
Updated patch in order to take the completed and due date into account.
comment:11 by , 19 years ago
See updated patch (attachment:natural_order_sort_for_milestones.2.diff).
I think this would also partially do what's requested in #2209 (what's left to be done would be the ordering in the query listing).
But in the meantime you can already check the Roadmap's ordering for correctness.
comment:12 by , 19 years ago
This should be moved to the Milestone class so that the ordering is consistent.
comment:13 by , 19 years ago
Milestone: | 0.10 → 0.9.4 |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
comment:14 by , 19 years ago
Using "sorted" with the "key" parameter in Python 2.4, or the "decorate-sort-undecorate" (DSU) idiom in earlier versions is a cleaner and faster way to sort values than using comparators. I've added a patch to do the milestone natual-ordering using the built-in sorted, or a small compatibility method to simulate it using DSU. It still needs ported to the browser ordering, but that's a little more convoluted, so I'll have to revisit it after work.
by , 19 years ago
Attachment: | milestone_sort_dsu.2.diff added |
---|
Updated mgood's patch so that it applies on top of r2758
comment:16 by , 19 years ago
Summary: | Support custom milestone ordering → Support custom milestone ordering. |
---|
comment:17 by , 7 years ago
Replying to Christopher Lenz:
Hold on, actually that breaks the ordering by due date.
The ordering should ideally be:
- completed date (already completed first, completed earlier first)
- due date (due date set first, due date earlier first)
- name (natural order)
in that order.
I think that the first two sorting criteria is quite natural.
However the third criteria which often arise when a milestone has no due date (and is not completed). For me it would be nice to be able to have control over the sort criteria then.
Consider for example having the milestones "Near future", "Distant future" and "Probably never" (with no due date). The intuitive sort order would be just that, but the natural sort order would be something completely different.
Currently a workaround if you want to have the intuitive sort order would be to prefix the names or setting an artificial due date to sort by.
A proposal would be to introduce an additional field to be used as a third criterion before sorting on name. This would be similar to the method used to sort ticket fields or workflow transition ordering. Then the ordering should be:
- completed date
- due date
- new additional field
- name
I don't think we can possibly support all different naming conventions for milestones. Note that some projects may not use terms like alpha or beta at all.
Currently, milestones are ordered primarily by date, and second alphabetically by name. It may make sense to support manual ordering of milestones so that the admin could simply say at what position a particular milestone should appear relative to the other ones. JIRA supports that, for example.