Edgewall Software
Modify

Opened 19 years ago

Closed 16 years ago

Last modified 13 years ago

#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)

2209-query-sort-milestone-r7439.patch (2.7 KB ) - added by Remy Blank <remy.blank@…> 16 years ago.
Patch against 0.11-stable fixing sorting by milestone in queries
2209-query-sort-milestone-r7443.patch (4.0 KB ) - added by Remy Blank <remy.blank@…> 16 years ago.
Same patch, additionally fixed test cases

Download all attachments as: .zip

Change History (21)

comment:1 by Christopher Lenz, 18 years ago

Milestone: 0.9.1
Status: newassigned

comment:2 by Christopher Lenz, 18 years ago

Milestone: 0.9.10.9.2

comment:3 by Christopher Lenz, 18 years ago

Milestone: 0.9.30.9.4

comment:4 by Christian Boos, 18 years ago

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.

comment:5 by Christopher Lenz, 18 years ago

Milestone: 0.9.40.10

comment:6 by anonymous, 18 years ago

please ignore, testing anonymous comments…

comment:7 by anonymous, 18 years ago

Testing

comment:8 by anonymous, 18 years ago

Would you like some tasty viagra?

comment:9 by anonymous, 18 years ago

comment:10 by Christian Boos, 18 years ago

This is not a test site. Please stop this.

comment:11 by Christian Boos, 18 years ago

Oops, just saw your mail on Trac Dev ;) Well simulated, jonas ;)

comment:12 by Christopher Lenz, 18 years ago

Milestone: 0.100.11
Status: assignednew

Ah well, postponing again.

comment:13 by anonymous, 16 years ago

Priority: lownormal

comment:14 by techtonik <techtonik@…>, 16 years ago

Query/filter functionality is a good idea. For possible uses see also bug #7342

by Remy Blank <remy.blank@…>, 16 years ago

Patch against 0.11-stable fixing sorting by milestone in queries

in reply to:  4 comment:15 by Remy Blank <remy.blank@…>, 16 years ago

Cc: remy.blank@… 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 Remy Blank <remy.blank@…>, 16 years ago

Same patch, additionally fixed test cases

comment:16 by Remy Blank <remy.blank@…>, 16 years ago

I had forgotten to run the test suite. The second patch also fixes the test cases.

comment:17 by Remy Blank, 16 years ago

Milestone: 0.11.30.11.2
Resolution: fixed
Status: newclosed

Patch applied in [7483].

comment:18 by Christian Boos, 15 years ago

Owner: changed from Christopher Lenz to Remy Blank

comment:19 by davidsarah, 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?

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Remy Blank.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Remy Blank to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.