Show tickets with no set milestone when sorting by priority

Colin Bartolome's Avatar

Colin Bartolome

04 Mar, 2009 07:37 PM

I recently set my Tickets tab to default to this search:

responsible:me state:open sort:priority

This had the effect of hiding all my tickets with no set milestone. Logically, I would expect those to show up at the lowest possible priority (i.e., after every other ticket with a set milestone) instead of not at all. Maybe this could be a separate sort option?

  1. 1 Posted by Colin Bartolome on 11 Mar, 2009 06:15 PM

    Colin Bartolome's Avatar

    This also affects tickets assigned to undated milestones.

  2. 2 Posted by Rick on 11 Mar, 2009 10:54 PM

    Rick's Avatar

    Ah, that has to do with the way mysql orders due dates. If you don't care about the database details, skip the rest of this paragraph :) The old way used a sort list like tickets.milestone_due_on, tickets.priority, tickets.updated_at desc. I just changed it to COALESCE(tickets.milestone_due_on, '2069-01-01'), tickets.priority, tickets.updated_at desc".freeze. I'm not totally happy with this solution, but it works for now.

    At any rate, tickets without a milestone or with an unscheduled milestone will appear at the bottom.

    I've also added a new sort option for ticket searches. You can now do sort:ticket-priority that completely disregards milestones. There's also sort:milestone-priority, which is the default sort:priority.

  3. 3 Posted by Colin Bartolome on 11 Mar, 2009 10:57 PM

    Colin Bartolome's Avatar

    Beautiful. Thanks!

  4. brandi closed this discussion on 29 Jun, 2012 10:10 PM.

Discussions are closed to public comments.
If you need help with Lighthouse please start a new discussion.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac