add has_due field for NULL LAST sorting