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