View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0009743 | mantisbt | bugtracker | public | 2008-10-24 09:15 | 2009-01-15 11:26 |
| Reporter | karotos | Assigned To | vboctor | ||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | closed | Resolution | fixed | ||
| Product Version | 1.2.0a2 | ||||
| Fixed in Version | 1.2.0a3 | ||||
| Summary | 0009743: sorting doesn't work in the View Issues page | ||||
| Description | I tried to sort by any column name, either by setting it as a filter (advanced and simple) or by clicking on the column name. The issues are always sorted by last modified | ||||
| Steps To Reproduce |
Expected result: Actual result: | ||||
| Additional Information | I also tried this here (http://www.mantisbt.org/bugs/view_all_bug_page.php) with the same results This happens with any column, using any browser (firefox, IE) and with or without a proxy | ||||
| Tags | patch | ||||
| Attached Files | 9743.patch (921 bytes)
Index: core/filter_api.php
===================================================================
--- core/filter_api.php (revision 5719)
+++ core/filter_api.php (working copy)
@@ -832,6 +832,8 @@
for( $i = 0;$i < count( $t_sort_fields );$i++ ) {
$c_sort = db_prepare_string( $t_sort_fields[$i] );
+ $c_dir = 'DESC' == $t_dir_fields[$i] ? 'DESC' : 'ASC';
+
if( !in_array( $t_sort_fields[$i], array_slice( $t_sort_fields, $i + 1 ) ) ) {
# if sorting by a custom field
@@ -849,9 +851,11 @@
$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";
}
- $c_dir = 'DESC' == $t_dir_fields[$i] ? 'DESC' : 'ASC';
$p_query_clauses['order'][] = "$c_cf_alias $c_dir";
}
+ else {
+ $p_query_clauses['order'][] = $c_sort . " " . $c_dir;
+ }
}
}
| ||||
|
MantisBT: master f10a1782 2008-10-26 00:04 Details Diff |
Fixes 0009743: sorting doesn't work in the View Issues page git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@5737 <a class="text" href="/?p=mantisbt.git;a=object;h=f5dc347c">f5dc347c</a>-c33d-0410-90a0-b07cc1902cb9 |
Affected Issues 0009743 |
|
| mod - core/filter_api.php | Diff File | ||