--- mantisbt-1.2.15/core/filter_api.php.orig	2014-01-22 11:50:42.315646273 +0100
+++ mantisbt-1.2.15/core/filter_api.php	2014-01-22 11:53:43.055395935 +0100
@@ -933,6 +933,9 @@
 					$p_query_clauses['join'][] = "LEFT JOIN $t_custom_field_string_table $t_cf_table_alias ON $t_bug_table.id = $t_cf_table_alias.bug_id AND $t_cf_table_alias.field_id = $t_custom_field_id";
 				}
 
+				if( CUSTOM_FIELD_TYPE_NUMERIC == custom_field_type( $t_custom_field_id ) ) {
+					$c_cf_alias = "CAST($t_cf_table_alias.value AS UNSIGNED)";
+				}
 				$p_query_clauses['order'][] = "$c_cf_alias $c_dir";
 
 			# if sorting by plugin columns
