ChiliProject is not maintained anymore. Please be advised that there will be no more updates.
We do not recommend that you setup new ChiliProject instances and we urge all existing users to migrate their data to a maintained system, e.g. Redmine. We will provide a migration script later. In the meantime, you can use the instructions by Christian Daehn.
Due date sort order should sort issues with no due date to the end of the list (Feature #499)
Description
Sorting by due date (ascending or descending) should place items with no due date next to the farthest-future items, not the almost-due items.
Associated revisions
Put issues with an empty due date in the future. #499
Put empty start_dates in the future too. #499
History
Updated by Eric Davis at 2011-07-01 04:44 pm
To be clear, like this?
- 2011-07-01
- 2011-07-02
- 2011-07-03
- (empty)
- (empty)
Updated by Maccabee Levine at 2011-07-01 05:26 pm
Yup. I just half-solved it locally with this one-line change in query.rb. (It's not perfect because it keeps the empty values at the end even if you sort in the opposite direction. But it was good enough for my use.)
#QueryColumn.new(:due_date, :sortable => "#{Issue.table_name}.due_date"),
QueryColumn.new(:due_date, :sortable => "case when #{Issue.table_name}.due_date is NULL then 1 else 0 end, #{Issue.table_name}.due_date"),
Updated by Felix Schäfer at 2011-07-08 08:28 pm
The SQL looks sound to me, let me check locally, if everything is OK I'll push it.
Should this be made the default for all date columns? (i.e. a NULL
date is always far in the future and not far in the past?)
- Target version set to 2.1.0
- Assignee set to Felix Schäfer
- (deleted custom field) set to master
Updated by Eric Davis at 2011-07-08 08:59 pm
Felix Schäfer wrote:
Should this be made the default for all date columns? (i.e. a
NULL
date is always far in the future and not far in the past?)
I don't think we can make a "default for all dates" statement from this. In this case a null due date can be interpreted as "no due date" which should be "far into the future". Other dates could be interpreted differently.
Updated by Felix Schäfer at 2011-07-08 09:25 pm
Ok, so it needed to be formatted a little differently for ChiliProject because the way you (Maccabee) posted it, ChiliProject wouldn't pass the sort direction (ASC or DESC) to the CASE
clause, resulting in issues with empty due dates always being at the end.
After having discussed it shortly with Eric on IRC (excerpt below), I applied the same treatment to the start_date
.
21:05 thegcat edavis10: null start_date, far future or far past? 21:13 edavis10 thegcat: hm... that would be "no start date" so it would be far future 21:13 thegcat edavis10: k, so same treatment 21:14 edavis10 yea, thats why I said it depends on the actual field 21:14 thegcat well, come to think of it 21:15 thegcat maybe a more common workflow is to say "empty" is immediate, only those with a date are in the future 21:15 edavis10 thegcat: for start date? I'd say "Today" would be immediate. 21:16 thegcat mmh, ok
- Status changed from Open to Closed
Updated by Maccabee Levine at 2011-07-18 05:59 pm
This makes sense to me.