end
class TimestampQueryColumn < QueryColumn
-
def groupable
if @groupable
Redmine::Database.timestamp_to_date(sortable, User.current.time_zone)
end
class QueryAssociationColumn < QueryColumn
-
def initialize(association, attribute, options={})
@association = association
@attribute = attribute
end
class QueryCustomFieldColumn < QueryColumn
-
def initialize(custom_field, options={})
self.name = "cf_#{custom_field.id}".to_sym
self.sortable = custom_field.order_statement || false
end
class QueryAssociationCustomFieldColumn < QueryCustomFieldColumn
-
def initialize(association, custom_field, options={})
super(custom_field, options)
self.name = "#{association}.cf_#{custom_field.id}".to_sym