Defect #32476
Sorting on multiple value fields is not working
Status: | New | Start date: | ||
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | - | % Done: | 0% | |
Category: | Issues list | |||
Target version: | - | |||
Resolution: | Affected version: | 4.0.3 |
Description
Redmine4.0.x
Tested on Issues. Tested format of the Multiple value fields: Key/Value lists.
Sorting on single value fieds works fine, but totally not working on multiple value fields,
History
#1
Updated by Taine Woo about 3 years ago
The sorting by multiple value field is disabled by:
app\models\custom_field.rb, line 193:
# Returns a ORDER BY clause that can used to sort customized # objects by their value of the custom field. # Returns nil if the custom field can not be used for sorting. def order_statement return nil if multiple? format.order_statement(self) end
But actually we can sorting by the multiple value allowed fields by:
1. order/sort the values of the multiple value allowed fields firstly, and generate the string;
2. order/sort by the field.