View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0015481 | mantisbt | custom fields | public | 2013-02-08 11:52 | 2017-08-19 21:32 |
Reporter | JP_MRX | Assigned To | dregad | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
OS | Win XP | ||||
Product Version | 1.2.12 | ||||
Target Version | 1.2.15 | Fixed in Version | 1.2.15 | ||
Summary | 0015481: Custom fields values are not sorted in the main filter | ||||
Description | In the "view issues" main filter, a list with all the values used for each custom field is displayed but unsorted. The selection is not easy for numerous values. The list is built by the custom_field_distinct_values function in custom_field_api and should be sorted by adding "ORDER BY cfst.value" on line 1164. | ||||
Tags | No tags attached. | ||||
This issue was probably introduced in 1.2.12 by commit b5abce1f, as the query retrieving the custom field values was rewritten with a SELECT DISTINCT instead of using a GROUP BY clause. With MySQL, group by sorts the results, whereas distinct does not (not tested with other rdbms). I'll add the ORDER BY clause as suggested. Thanks for the bug report. |
|
Marking as 'acknowledged' not resolved/closed to track that change gets ported to master-2.0.x branch |
|
MantisBT: master-1.2.x 645ac2e9 2013-02-09 11:54 Details Diff |
Fix 0015481: custom field values sort order in view all page filter Commit b5abce1f917da688c86aec17dee11111ced5f0b7 introduced a regression in the sort order of custom field values because the query retrieving the custom field values was rewritten with a SELECT DISTINCT instead of using a GROUP BY clause. With MySQL, group by sorts the results, whereas distinct does not (not tested with other RDBMS). This fixes the issue by adding an ORDER BY clause. |
Affected Issues 0015481 |
|
mod - core/custom_field_api.php | Diff File | ||
MantisBT: master b8dc9937 2013-02-09 11:54 Details Diff |
Fix 0015481: custom field values sort order in view all page filter Commit b5abce1f917da688c86aec17dee11111ced5f0b7 introduced a regression in the sort order of custom field values because the query retrieving the custom field values was rewritten with a SELECT DISTINCT instead of using a GROUP BY clause. With MySQL, group by sorts the results, whereas distinct does not (not tested with other RDBMS). This fixes the issue by adding an ORDER BY clause. |
Affected Issues 0015481 |
|
mod - core/custom_field_api.php | Diff File |