|
|
@ -114,7 +114,8 @@ public class SortHelper {
|
|
|
|
+ ADJUSTED_DUE_DATE
|
|
|
|
+ ADJUSTED_DUE_DATE
|
|
|
|
+ ") END) "
|
|
|
|
+ ") END) "
|
|
|
|
+ // else due time
|
|
|
|
+ // else due time
|
|
|
|
"+ 172800000 * importance"); // add 2 days * importance
|
|
|
|
// add slightly less than 2 days * importance to give due date priority over importance in case of tie
|
|
|
|
|
|
|
|
"+ 172799999 * importance");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (sortType != SORT_ALPHA) {
|
|
|
|
if (sortType != SORT_ALPHA) {
|
|
|
|
order.addSecondaryExpression(ORDER_TITLE);
|
|
|
|
order.addSecondaryExpression(ORDER_TITLE);
|
|
|
@ -174,7 +175,8 @@ public class SortHelper {
|
|
|
|
+ ADJUSTED_DUE_DATE.replace("dueDate", "tasks.dueDate")
|
|
|
|
+ ADJUSTED_DUE_DATE.replace("dueDate", "tasks.dueDate")
|
|
|
|
+ ") END) "
|
|
|
|
+ ") END) "
|
|
|
|
+ // else due time
|
|
|
|
+ // else due time
|
|
|
|
"+ 172800000 * tasks.importance AS sort_smart"; // add 2 days * importance
|
|
|
|
// add slightly less than 2 days * importance to give due date priority over importance in case of tie
|
|
|
|
|
|
|
|
"+ 172799999 * tasks.importance AS sort_smart";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return select;
|
|
|
|
return select;
|
|
|
|