Edgewall Software

Ticket #4021 (closed defect: fixed)

Opened 2 years ago

Last modified 4 months ago

When modifying a ticket the milestone combo shows unsorted entries

Reported by: alex@… Owned by: remy.blank@…
Priority: normal Milestone: 0.11.1
Component: ticket system Version: 0.10
Severity: normal Keywords: sorting patch
Cc: remy.blank@…

Description

I have a lot of milestones, and I use them prefixed with numbers (i.e.:000 ... XXX).

When I create a new ticket the drop down shows me the correct list of open milestones, sorted.

When I modify an existing ticket I see all the milestones (also closed ones), in a pseudo-sorted list (i.e.: The sorting in uncorrect). It would also be nice to have the closed milestones separated from the open ones.

Attachments

4021-milestone-categories-r7376.patch (2.0 KB) - added by Remy Blank <remy.blank@…> 4 months ago.
Patch against 0.11-stable partitioning milestones into due, not due and closed

Change History

in reply to: ↑ description   Changed 2 years ago by mgood

  • keywords needinfo added

Replying to alex@nibbles.it:

When I modify an existing ticket I see all the milestones (also closed ones), in a pseudo-sorted list (i.e.: The sorting in uncorrect). It would also be nice to have the closed milestones separated from the open ones.

Milestones are sorted as follows:

  • closed milestones by completion date
  • open milestones by due date
  • open milestones without due date by name

What would you consider to be "correct" sorting? If you'd like to see a change please be specific and try to provide your reasoning.

  Changed 2 years ago by alessio.spadaro@…

I have a similar problem, maybe related to the way we use trac. We made milestones on a daily basis, so the list grows quite fast. It would be nice to be able to filter out closed ones, as they tend to hide the open ones. Also (IMHO) it is more frequent for a ticket to be moved to an open milestone, rather than to an open one, isn't it? So, a better sorting order should be open by due date, open w/o due date by name, closed ones.

  Changed 2 years ago by cboos

  • owner changed from jonas to cboos
  • milestone set to 0.11

Maybe the correct thing to do would be to use <optgroup> here (with the 3 groups mentioned in mgood's comment).

Right now in Trac we have the following list:

  • ...
  • 0.9.5
  • 0.9.6
  • 0.10
  • 0.10.1
  • 0.9.7
  • 0.10.2
  • 0.11
  • ...

and I find myself picking 0.10.1 instead of 0.10.2...

follow-up: ↓ 5   Changed 11 months ago by hyuga <hyugaricdeau@…>

Hasn't this basically been done as of r6171?

in reply to: ↑ 4   Changed 10 months ago by osimons

Replying to hyuga <hyugaricdeau@gmail.com>:

Hasn't this basically been done as of r6171?

It sure looks that way. I can't quite figure it out though, as I'm not certain what the others above actually define as expected result...

  Changed 10 months ago by cboos

Well, the list can still look confusing:

  • first you have the list of milestone with a date set, sorted by ascending date
  • then you have the list of milestone without a date set, sorted alphanumerically

This makes sense on the Roadmap page, because you can actually see the dates (or the No date set mention), but in a drop-down list, it can be confusing.

Possible enhancements would be either to sort everything alphanumerically, or to make those groups visible, e.g.

  • Milestones by date
    • Orange release
    • Blue release
  • Other Milestones
    • Alpha release
    • Beta release

  Changed 4 months ago by Remy Blank <remy.blank@…>

  • cc remy.blank@… added

The solution proposed in comment:2 above seems pretty reasonable:

  • Open milestones by due date
    • Orange release
    • Blue release
  • Open milestones w/o due date
    • Alpha release
    • Beta release
  • Closed milestones
    • 1.0 release
    • 2.0 release

The first section is sorted by due date, the second by name, and the third by completion date. This would be for the case when viewing an existing ticket. When creating a new ticket, only the first two sections would be visible.

Please tell me if this is worth pursuing, and I'll provide a patch.

  Changed 4 months ago by cboos

  • keywords needinfo removed
  • owner changed from cboos to remy.blank@…
  • component changed from general to ticket system
  • milestone changed from 0.11.2 to 0.11.1

The above is OK for me, maybe the "milestones" word could be avoided in the <optgroup> elements: Open (by due date), Open (no due date) and Closed maybe?

(Remy, I'm reassigning to you as you volunteered for a patch)

Changed 4 months ago by Remy Blank <remy.blank@…>

Patch against 0.11-stable partitioning milestones into due, not due and closed

  Changed 4 months ago by Remy Blank <remy.blank@…>

  • keywords patch added

The patch above partitions the milestones into "Open (by due date)", "Open (no due date)" and "Closed", where the first is sorted by due date, the second by name and the third by completion date.

The last category is only shown if the ticket exists (i.e. not when creating a new ticket) and the user has the TICKET_ADMIN permission.

  Changed 4 months ago by cboos

  • status changed from new to closed
  • resolution set to fixed

Patch applied in r7383.

Add/Change #4021 (When modifying a ticket the milestone combo shows unsorted entries)

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
to The owner will change from remy.blank@pobox.com. Next status will be 'closed'
 
Note: See TracTickets for help on using tickets.