@@ -56,7 +56,7 @@ class Issue < ActiveRecord::Base
...
@@ -56,7 +56,7 @@ class Issue < ActiveRecord::Base
scope:order_due_date_asc,->{reorder('issues.due_date IS NULL, issues.due_date ASC')}
scope:order_due_date_asc,->{reorder('issues.due_date IS NULL, issues.due_date ASC')}
scope:order_due_date_desc,->{reorder('issues.due_date IS NULL, issues.due_date DESC')}
scope:order_due_date_desc,->{reorder('issues.due_date IS NULL, issues.due_date DESC')}
scope:order_closest_future_date,->{reorder('CASE WHEN due_date >= CURRENT_DATE THEN 0 ELSE 1 END ASC, ABS(CURRENT_DATE - due_date) ASC')}
scope:order_closest_future_date,->{reorder('CASE WHEN issues.due_date >= CURRENT_DATE THEN 0 ELSE 1 END ASC, ABS(CURRENT_DATE - issues.due_date) ASC')}