summaryrefslogtreecommitdiffstats
path: root/app/models/custom_field_enumeration.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2016-03-12 13:40:22 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2016-03-12 13:40:22 +0000
commite0ae0f287a5f7e439869bd11367222928f21a624 (patch)
treeb62a4a51ccb2b4749fc2c7cb424800a11560a064 /app/models/custom_field_enumeration.rb
parent9473a373a50dca54ad0400f5ea4a4273a3a17851 (diff)
downloadredmine-e0ae0f287a5f7e439869bd11367222928f21a624.tar.gz
redmine-e0ae0f287a5f7e439869bd11367222928f21a624.zip
Fixed that grouping issue by key/value custom field does not work (#22178).
git-svn-id: http://svn.redmine.org/redmine/trunk@15224 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/custom_field_enumeration.rb')
-rw-r--r--app/models/custom_field_enumeration.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/models/custom_field_enumeration.rb b/app/models/custom_field_enumeration.rb
index 26a580def..e3e1f3238 100644
--- a/app/models/custom_field_enumeration.rb
+++ b/app/models/custom_field_enumeration.rb
@@ -65,6 +65,12 @@ class CustomFieldEnumeration < ActiveRecord::Base
end
end
+ def self.fields_for_order_statement(table=nil)
+ table ||= table_name
+ columns = ['position']
+ columns.uniq.map {|field| "#{table}.#{field}"}
+ end
+
private
def set_position