Project

General

Profile

Defect #31487 ยป any_clause.patch

Dmitry Makurin , 2019-05-31 12:19

View differences:

app/models/query.rb (date 1559208940000)
1195 1195
      sql = "#{db_table}.#{db_field} IS NULL"
1196 1196
      sql += " OR #{db_table}.#{db_field} = ''" if ((is_custom_filter && (available_filters[field][:field].field_format != 'int' && available_filters[field][:field].field_format != 'bool' && available_filters[field][:field].field_format != 'enumeration' && available_filters[field][:field].field_format != 'user')) || [:text, :string].include?(type_for(field)))
1197 1197
    when "*"
1198
      sql = "#{db_table}.#{db_field} IS NOT NULL"
1198
      # sql = "#{db_table}.#{db_field} IS NOT NULL"
1199
      sql = "1=1"
1199 1200
      sql += " AND #{db_table}.#{db_field} <> ''" if is_custom_filter && (available_filters[field][:field].field_format != 'int' && available_filters[field][:field].field_format != 'bool' && available_filters[field][:field].field_format != 'enumeration' && available_filters[field][:field].field_format != 'user')
1200 1201
    when ">="
1201 1202
      if [:date, :date_past].include?(type_for(field))
    (1-1/1)