Sorting on multiple value fields is not working
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,
#1 Updated by Taine Woo about 2 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.