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_closest_future_date,->{reorder('CASE WHEN issues.due_date >= CURRENT_DATE THEN 0 ELSE 1 END ASC, ABS(CURRENT_DATE - issues.due_date) ASC')}
scope:order_closest_future_date,->{reorder(Arel.sql('CASE WHEN issues.due_date >= CURRENT_DATE THEN 0 ELSE 1 END ASC, ABS(CURRENT_DATE - issues.due_date) ASC'))}