Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

When sorting by due_date, display undefined values last

Markus' original patch was modified to simplify the code and reduce
duplication, fix a couple typos in comment text and reword the
commit message.

Fixes #16259
  • Loading branch information...
commit 044133b367234e0e46976dff6d4602b9e8338e72 1 parent 5c4f817
@OSguard OSguard authored dregad committed
Showing with 8 additions and 1 deletion.
  1. +8 −1 core/filter_api.php
View
9 core/filter_api.php
@@ -978,7 +978,14 @@ function filter_get_query_sort_data( &$p_filter, $p_show_sticky, $p_query_clause
# standard column
} else {
- $p_query_clauses['order'][] = "$t_bug_table.$c_sort $c_dir";
+ $t_sort_col = "$t_bug_table.$c_sort";
+
+ # when sorting by due_date, always display undefined dates last
+ if( 'due_date' == $c_sort && 'ASC' == $c_dir ) {
+ $t_sort_col = "$t_sort_col = 1, $t_sort_col";
+ }
+
+ $p_query_clauses['order'][] = "$t_sort_col $c_dir";
}
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.