114 |
114 |
:date_past => [ ">t-", "<t-", "t-", "t", "w" ],
|
115 |
115 |
:string => [ "=", "~", "!", "!~" ],
|
116 |
116 |
:text => [ "~", "!~" ],
|
117 |
|
:integer => [ "=", ">=", "<=", "!*", "*" ] }
|
|
117 |
:integer => [ "=", ">=", "<=", "!*", "*" ],
|
|
118 |
:float => [ "=", ">=", "<=", "!*", "*" ] }
|
118 |
119 |
|
119 |
120 |
cattr_reader :operators_by_filter_type
|
120 |
121 |
|
... | ... | |
519 |
520 |
sql = "#{db_table}.#{db_field} IS NOT NULL"
|
520 |
521 |
sql << " AND #{db_table}.#{db_field} <> ''" if is_custom_filter
|
521 |
522 |
when ">="
|
522 |
|
sql = "#{db_table}.#{db_field} >= #{value.first.to_i}"
|
|
523 |
sql = "CAST(#{db_table}.#{db_field} AS decimal(60,3)) >= #{value.first.to_f}"
|
523 |
524 |
when "<="
|
524 |
|
sql = "#{db_table}.#{db_field} <= #{value.first.to_i}"
|
|
525 |
sql = "CAST(#{db_table}.#{db_field} AS decimal(60,3)) <= #{value.first.to_f}"
|
525 |
526 |
when "o"
|
526 |
527 |
sql = "#{IssueStatus.table_name}.is_closed=#{connection.quoted_false}" if field == "status_id"
|
527 |
528 |
when "c"
|
... | ... | |
569 |
570 |
options = { :type => :date, :order => 20 }
|
570 |
571 |
when "bool"
|
571 |
572 |
options = { :type => :list, :values => [[l(:general_text_yes), "1"], [l(:general_text_no), "0"]], :order => 20 }
|
|
573 |
when "int"
|
|
574 |
options = { :type => :integer, :order => 20 }
|
|
575 |
when "float"
|
|
576 |
options = { :type => :float, :order => 20 }
|
572 |
577 |
else
|
573 |
578 |
options = { :type => :string, :order => 20 }
|
574 |
579 |
end
|