@@ -32,6 +32,8 class Query < ActiveRecord::Base | |||
|
32 | 32 | "c" => :label_closed_issues, |
|
33 | 33 | "!*" => :label_none, |
|
34 | 34 | "*" => :label_all, |
|
35 | ">=" => '>=', | |
|
36 | "<=" => '<=', | |
|
35 | 37 | "<t+" => :label_in_less_than, |
|
36 | 38 | ">t+" => :label_in_more_than, |
|
37 | 39 | "t+" => :label_in, |
@@ -52,7 +54,8 class Query < ActiveRecord::Base | |||
|
52 | 54 | :date => [ "<t+", ">t+", "t+", "t", "w", ">t-", "<t-", "t-" ], |
|
53 | 55 | :date_past => [ ">t-", "<t-", "t-", "t", "w" ], |
|
54 | 56 | :string => [ "=", "~", "!", "!~" ], |
|
55 |
:text => [ "~", "!~" ] |
|
|
57 | :text => [ "~", "!~" ], | |
|
58 | :integer => [ "=", ">=", "<=" ] } | |
|
56 | 59 | |
|
57 | 60 | cattr_reader :operators_by_filter_type |
|
58 | 61 | |
@@ -91,7 +94,8 class Query < ActiveRecord::Base | |||
|
91 | 94 | "created_on" => { :type => :date_past, :order => 9 }, |
|
92 | 95 | "updated_on" => { :type => :date_past, :order => 10 }, |
|
93 | 96 | "start_date" => { :type => :date, :order => 11 }, |
|
94 |
"due_date" => { :type => :date, :order => 12 } |
|
|
97 | "due_date" => { :type => :date, :order => 12 }, | |
|
98 | "done_ratio" => { :type => :integer, :order => 13 }} | |
|
95 | 99 | |
|
96 | 100 | user_values = [] |
|
97 | 101 | if project |
@@ -221,6 +225,10 class Query < ActiveRecord::Base | |||
|
221 | 225 | sql = sql + "#{db_table}.#{db_field} IS NULL" |
|
222 | 226 | when "*" |
|
223 | 227 | sql = sql + "#{db_table}.#{db_field} IS NOT NULL" |
|
228 | when ">=" | |
|
229 | sql = sql + "#{db_table}.#{db_field} >= #{v.first.to_i}" | |
|
230 | when "<=" | |
|
231 | sql = sql + "#{db_table}.#{db_field} <= #{v.first.to_i}" | |
|
224 | 232 | when "o" |
|
225 | 233 | sql = sql + "#{IssueStatus.table_name}.is_closed=#{connection.quoted_false}" if field == "status_id" |
|
226 | 234 | when "c" |
@@ -84,6 +84,8 function toggle_multi_select(field) { | |||
|
84 | 84 | <%= text_field_tag "values[#{field}][]", query.values_for(field), :id => "values_#{field}", :size => 3, :class => "select-small" %> <%= l(:label_day_plural) %> |
|
85 | 85 | <% when :string, :text %> |
|
86 | 86 | <%= text_field_tag "values[#{field}][]", query.values_for(field), :id => "values_#{field}", :size => 30, :class => "select-small" %> |
|
87 | <% when :integer %> | |
|
88 | <%= text_field_tag "values[#{field}][]", query.values_for(field), :id => "values_#{field}", :size => 3, :class => "select-small" %> | |
|
87 | 89 | <% end %> |
|
88 | 90 | </div> |
|
89 | 91 | <script type="text/javascript">toggle_filter('<%= field %>');</script> |
General Comments 0
You need to be logged in to leave comments.
Login now