I have a Task model with a DueDate SS_Datetime field. To see the 'soonest due' tasks first, I sort my tasks by DueDate ASC.. This works as expected, apart from the fact that tasks without due dates are shown before tasks with due dates.
I was wondering if there was a custom sort; or a field modifier like sort('DueDate:exists') etc?
Alternatively, I can create a HasDueDate Boolen field that's set to !empty($this->DueDate) onBeforeWrite, but maybe there is a better way?