"c" => :label_closed_issues,
"!*" => :label_none,
"*" => :label_all,
+ ">=" => '>=',
+ "<=" => '<=',
"<t+" => :label_in_less_than,
">t+" => :label_in_more_than,
"t+" => :label_in,
:date => [ "<t+", ">t+", "t+", "t", "w", ">t-", "<t-", "t-" ],
:date_past => [ ">t-", "<t-", "t-", "t", "w" ],
:string => [ "=", "~", "!", "!~" ],
- :text => [ "~", "!~" ] }
+ :text => [ "~", "!~" ],
+ :integer => [ "=", ">=", "<=" ] }
cattr_reader :operators_by_filter_type
"created_on" => { :type => :date_past, :order => 9 },
"updated_on" => { :type => :date_past, :order => 10 },
"start_date" => { :type => :date, :order => 11 },
- "due_date" => { :type => :date, :order => 12 } }
+ "due_date" => { :type => :date, :order => 12 },
+ "done_ratio" => { :type => :integer, :order => 13 }}
user_values = []
if project
sql = sql + "#{db_table}.#{db_field} IS NULL"
when "*"
sql = sql + "#{db_table}.#{db_field} IS NOT NULL"
+ when ">="
+ sql = sql + "#{db_table}.#{db_field} >= #{v.first.to_i}"
+ when "<="
+ sql = sql + "#{db_table}.#{db_field} <= #{v.first.to_i}"
when "o"
sql = sql + "#{IssueStatus.table_name}.is_closed=#{connection.quoted_false}" if field == "status_id"
when "c"
<%= text_field_tag "values[#{field}][]", query.values_for(field), :id => "values_#{field}", :size => 3, :class => "select-small" %> <%= l(:label_day_plural) %>
<% when :string, :text %>
<%= text_field_tag "values[#{field}][]", query.values_for(field), :id => "values_#{field}", :size => 30, :class => "select-small" %>
+ <% when :integer %>
+ <%= text_field_tag "values[#{field}][]", query.values_for(field), :id => "values_#{field}", :size => 3, :class => "select-small" %>
<% end %>
</div>
<script type="text/javascript">toggle_filter('<%= field %>');</script>