@@ -101,6 +101,7 class Query < ActiveRecord::Base | |||||
101 | "*" => :label_all, |
|
101 | "*" => :label_all, | |
102 | ">=" => :label_greater_or_equal, |
|
102 | ">=" => :label_greater_or_equal, | |
103 | "<=" => :label_less_or_equal, |
|
103 | "<=" => :label_less_or_equal, | |
|
104 | "><" => :label_between, | |||
104 | "<t+" => :label_in_less_than, |
|
105 | "<t+" => :label_in_less_than, | |
105 | ">t+" => :label_in_more_than, |
|
106 | ">t+" => :label_in_more_than, | |
106 | "t+" => :label_in, |
|
107 | "t+" => :label_in, | |
@@ -122,7 +123,7 class Query < ActiveRecord::Base | |||||
122 | :date_past => [ ">t-", "<t-", "t-", "t", "w" ], |
|
123 | :date_past => [ ">t-", "<t-", "t-", "t", "w" ], | |
123 | :string => [ "=", "~", "!", "!~" ], |
|
124 | :string => [ "=", "~", "!", "!~" ], | |
124 | :text => [ "~", "!~" ], |
|
125 | :text => [ "~", "!~" ], | |
125 | :integer => [ "=", ">=", "<=", "!*", "*" ] } |
|
126 | :integer => [ "=", ">=", "<=", "><", "!*", "*" ] } | |
126 |
|
127 | |||
127 | cattr_reader :operators_by_filter_type |
|
128 | cattr_reader :operators_by_filter_type | |
128 |
|
129 | |||
@@ -306,6 +307,10 class Query < ActiveRecord::Base | |||||
306 | def values_for(field) |
|
307 | def values_for(field) | |
307 | has_filter?(field) ? filters[field][:values] : nil |
|
308 | has_filter?(field) ? filters[field][:values] : nil | |
308 | end |
|
309 | end | |
|
310 | ||||
|
311 | def value_for(field, index=0) | |||
|
312 | (values_for(field) || [])[index] | |||
|
313 | end | |||
309 |
|
314 | |||
310 | def label_for(field) |
|
315 | def label_for(field) | |
311 | label = available_filters[field][:name] if available_filters.has_key?(field) |
|
316 | label = available_filters[field][:name] if available_filters.has_key?(field) | |
@@ -627,6 +632,12 class Query < ActiveRecord::Base | |||||
627 | else |
|
632 | else | |
628 | sql = "#{db_table}.#{db_field} <= #{value.first.to_i}" |
|
633 | sql = "#{db_table}.#{db_field} <= #{value.first.to_i}" | |
629 | end |
|
634 | end | |
|
635 | when "><" | |||
|
636 | if is_custom_filter | |||
|
637 | sql = "CAST(#{db_table}.#{db_field} AS decimal(60,3)) BETWEEN #{value[0].to_i} AND #{value[1].to_i}" | |||
|
638 | else | |||
|
639 | sql = "#{db_table}.#{db_field} BETWEEN #{value[0].to_i} AND #{value[1].to_i}" | |||
|
640 | end | |||
630 | when "o" |
|
641 | when "o" | |
631 | sql = "#{IssueStatus.table_name}.is_closed=#{connection.quoted_false}" if field == "status_id" |
|
642 | sql = "#{IssueStatus.table_name}.is_closed=#{connection.quoted_false}" if field == "status_id" | |
632 | when "c" |
|
643 | when "c" | |
@@ -654,6 +665,8 class Query < ActiveRecord::Base | |||||
654 | sql = "LOWER(#{db_table}.#{db_field}) LIKE '%#{connection.quote_string(value.first.to_s.downcase)}%'" |
|
665 | sql = "LOWER(#{db_table}.#{db_field}) LIKE '%#{connection.quote_string(value.first.to_s.downcase)}%'" | |
655 | when "!~" |
|
666 | when "!~" | |
656 | sql = "LOWER(#{db_table}.#{db_field}) NOT LIKE '%#{connection.quote_string(value.first.to_s.downcase)}%'" |
|
667 | sql = "LOWER(#{db_table}.#{db_field}) NOT LIKE '%#{connection.quote_string(value.first.to_s.downcase)}%'" | |
|
668 | else | |||
|
669 | raise "Unknown query operator #{operator}" | |||
657 | end |
|
670 | end | |
658 |
|
671 | |||
659 | return sql |
|
672 | return sql |
@@ -22,13 +22,13 function toggle_filter(field) { | |||||
22 | if (check_box.checked) { |
|
22 | if (check_box.checked) { | |
23 | Element.show("operators_" + field); |
|
23 | Element.show("operators_" + field); | |
24 | Form.Element.enable("operators_" + field); |
|
24 | Form.Element.enable("operators_" + field); | |
25 | Form.Element.enable("values_" + field); |
|
25 | $$(".values_" + field).each(function(el){ Form.Element.enable(el)}); | |
26 | toggle_operator(field); |
|
26 | toggle_operator(field); | |
27 | } else { |
|
27 | } else { | |
28 | Element.hide("operators_" + field); |
|
28 | Element.hide("operators_" + field); | |
29 | Element.hide("div_values_" + field); |
|
29 | Element.hide("div_values_" + field); | |
30 | Form.Element.disable("operators_" + field); |
|
30 | Form.Element.disable("operators_" + field); | |
31 | Form.Element.disable("values_" + field); |
|
31 | $$(".values_" + field).each(function(el){ Form.Element.disable(el)}); | |
32 | } |
|
32 | } | |
33 | } |
|
33 | } | |
34 |
|
34 | |||
@@ -42,9 +42,18 function toggle_operator(field) { | |||||
42 | case "o": |
|
42 | case "o": | |
43 | case "c": |
|
43 | case "c": | |
44 | Element.hide("div_values_" + field); |
|
44 | Element.hide("div_values_" + field); | |
|
45 | var v = $$(".values_" + field); | |||
|
46 | if (v.length > 1) {v[1].hide(); Form.Element.disable(v[1])} | |||
|
47 | break; | |||
|
48 | case "><": | |||
|
49 | Element.show("div_values_" + field); | |||
|
50 | var v = $$(".values_" + field); | |||
|
51 | if (v.length > 1) {v[1].show(); Form.Element.enable(v[1])} | |||
45 | break; |
|
52 | break; | |
46 | default: |
|
53 | default: | |
47 | Element.show("div_values_" + field); |
|
54 | Element.show("div_values_" + field); | |
|
55 | var v = $$(".values_" + field); | |||
|
56 | if (v.length > 1) {v[1].hide(); Form.Element.disable(v[1])} | |||
48 | break; |
|
57 | break; | |
49 | } |
|
58 | } | |
50 | } |
|
59 | } | |
@@ -86,22 +95,22 Event.observe(document,"dom:loaded", apply_filters_observer); | |||||
86 | <%= check_box_tag 'f[]', field, query.has_filter?(field), :onclick => "toggle_filter('#{field}');", :id => "cb_#{field}" %> |
|
95 | <%= check_box_tag 'f[]', field, query.has_filter?(field), :onclick => "toggle_filter('#{field}');", :id => "cb_#{field}" %> | |
87 | <label for="cb_<%= field %>"><%= filter[1][:name] || l(("field_"+field.to_s.gsub(/\_id$/, "")).to_sym) %></label> |
|
96 | <label for="cb_<%= field %>"><%= filter[1][:name] || l(("field_"+field.to_s.gsub(/\_id$/, "")).to_sym) %></label> | |
88 | </td> |
|
97 | </td> | |
89 |
<td style="width:1 |
|
98 | <td style="width:170px;"> | |
90 | <%= select_tag "op[#{field}]", options_for_select(operators_for_select(options[:type]), query.operator_for(field)), :id => "operators_#{field}", :onchange => "toggle_operator('#{field}');", :style => "vertical-align: top;" %> |
|
99 | <%= select_tag "op[#{field}]", options_for_select(operators_for_select(options[:type]), query.operator_for(field)), :id => "operators_#{field}", :onchange => "toggle_operator('#{field}');", :style => "vertical-align: top;" %> | |
91 | </td> |
|
100 | </td> | |
92 | <td> |
|
101 | <td> | |
93 | <div id="div_values_<%= field %>" style="display:none;"> |
|
102 | <div id="div_values_<%= field %>" style="display:none;"> | |
94 | <% case options[:type] |
|
103 | <% case options[:type] | |
95 | when :list, :list_optional, :list_status, :list_subprojects %> |
|
104 | when :list, :list_optional, :list_status, :list_subprojects %> | |
96 |
<%= select_tag "v[#{field}][]", options_for_select(options[:values], query.values_for(field)), : |
|
105 | <%= select_tag "v[#{field}][]", options_for_select(options[:values], query.values_for(field)), :class => "values_#{field}", :multiple => (query.values_for(field) && query.values_for(field).length > 1) %> | |
97 | <%= link_to_function image_tag('bullet_toggle_plus.png'), "toggle_multi_select('#{field}');", :style => "vertical-align: bottom;" %> |
|
106 | <%= link_to_function image_tag('bullet_toggle_plus.png'), "toggle_multi_select('#{field}');", :style => "vertical-align: bottom;" %> | |
98 | <% when :date, :date_past %> |
|
107 | <% when :date, :date_past %> | |
99 |
<%= text_field_tag "v[#{field}][]", query.value |
|
108 | <%= text_field_tag "v[#{field}][]", query.value_for(field), :class => "values_#{field}", :size => 3 %> <%= l(:label_day_plural) %> | |
100 | <% when :string, :text %> |
|
109 | <% when :string, :text %> | |
101 |
<%= text_field_tag "v[#{field}][]", query.value |
|
110 | <%= text_field_tag "v[#{field}][]", query.value_for(field), :class => "values_#{field}", :size => 30 %> | |
102 | <% when :integer %> |
|
111 | <% when :integer %> | |
103 |
<%= text_field_tag "v[#{field}][]", query.value |
|
112 | <%= text_field_tag "v[#{field}][]", query.value_for(field), :class => "values_#{field}", :size => 3 %> | |
104 |
<%= text_field_tag "v[#{field}][]", query.value |
|
113 | <%= text_field_tag "v[#{field}][]", query.value_for(field, 1), :class => "values_#{field}", :size => 3 %> | |
105 | <% end %> |
|
114 | <% end %> | |
106 | </div> |
|
115 | </div> | |
107 | <script type="text/javascript">toggle_filter('<%= field %>');</script> |
|
116 | <script type="text/javascript">toggle_filter('<%= field %>');</script> |
@@ -976,3 +976,4 bg: | |||||
976 | enumeration_activities: Дейности (time tracking) |
|
976 | enumeration_activities: Дейности (time tracking) | |
977 | enumeration_system_activity: Системна активност |
|
977 | enumeration_system_activity: Системна активност | |
978 | notice_issue_successful_create: Issue %{id} created. |
|
978 | notice_issue_successful_create: Issue %{id} created. | |
|
979 | label_between: between |
@@ -991,3 +991,4 bs: | |||||
991 | text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it. |
|
991 | text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it. | |
992 | text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel. |
|
992 | text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel. | |
993 | notice_issue_successful_create: Issue %{id} created. |
|
993 | notice_issue_successful_create: Issue %{id} created. | |
|
994 | label_between: between |
@@ -980,3 +980,4 ca: | |||||
980 | text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it. |
|
980 | text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it. | |
981 | text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel. |
|
981 | text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel. | |
982 | notice_issue_successful_create: Issue %{id} created. |
|
982 | notice_issue_successful_create: Issue %{id} created. | |
|
983 | label_between: between |
@@ -981,3 +981,4 cs: | |||||
981 | text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it. |
|
981 | text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it. | |
982 | text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel. |
|
982 | text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel. | |
983 | notice_issue_successful_create: Issue %{id} created. |
|
983 | notice_issue_successful_create: Issue %{id} created. | |
|
984 | label_between: between |
@@ -994,3 +994,4 da: | |||||
994 | text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it. |
|
994 | text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it. | |
995 | text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel. |
|
995 | text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel. | |
996 | notice_issue_successful_create: Issue %{id} created. |
|
996 | notice_issue_successful_create: Issue %{id} created. | |
|
997 | label_between: between |
@@ -996,3 +996,4 de: | |||||
996 | text_scm_command_not_available: Scm Kommando ist nicht verfügbar. Bitte prüfen Sie die Einstellungen im Administrationspanel. |
|
996 | text_scm_command_not_available: Scm Kommando ist nicht verfügbar. Bitte prüfen Sie die Einstellungen im Administrationspanel. | |
997 |
|
997 | |||
998 | notice_issue_successful_create: Issue %{id} created. |
|
998 | notice_issue_successful_create: Issue %{id} created. | |
|
999 | label_between: between |
@@ -977,3 +977,4 el: | |||||
977 | text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it. |
|
977 | text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it. | |
978 | text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel. |
|
978 | text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel. | |
979 | notice_issue_successful_create: Issue %{id} created. |
|
979 | notice_issue_successful_create: Issue %{id} created. | |
|
980 | label_between: between |
@@ -980,3 +980,4 en-GB: | |||||
980 | text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it. |
|
980 | text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it. | |
981 | text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel. |
|
981 | text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel. | |
982 | notice_issue_successful_create: Issue %{id} created. |
|
982 | notice_issue_successful_create: Issue %{id} created. | |
|
983 | label_between: between |
@@ -623,6 +623,7 en: | |||||
623 | label_in_more_than: in more than |
|
623 | label_in_more_than: in more than | |
624 | label_greater_or_equal: '>=' |
|
624 | label_greater_or_equal: '>=' | |
625 | label_less_or_equal: '<=' |
|
625 | label_less_or_equal: '<=' | |
|
626 | label_between: between | |||
626 | label_in: in |
|
627 | label_in: in | |
627 | label_today: today |
|
628 | label_today: today | |
628 | label_all_time: all time |
|
629 | label_all_time: all time |
@@ -1014,3 +1014,4 es: | |||||
1014 | text_scm_config: Puede configurar las órdenes de cada scm en configuration/configuration.yml. Por favor, reinicie la aplicación después de editarlo |
|
1014 | text_scm_config: Puede configurar las órdenes de cada scm en configuration/configuration.yml. Por favor, reinicie la aplicación después de editarlo | |
1015 | text_scm_command_not_available: La orden para el Scm no está disponible. Por favor, compruebe la configuración en el panel de administración. |
|
1015 | text_scm_command_not_available: La orden para el Scm no está disponible. Por favor, compruebe la configuración en el panel de administración. | |
1016 | notice_issue_successful_create: Issue %{id} created. |
|
1016 | notice_issue_successful_create: Issue %{id} created. | |
|
1017 | label_between: between |
@@ -981,3 +981,4 eu: | |||||
981 | text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it. |
|
981 | text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it. | |
982 | text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel. |
|
982 | text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel. | |
983 | notice_issue_successful_create: Issue %{id} created. |
|
983 | notice_issue_successful_create: Issue %{id} created. | |
|
984 | label_between: between |
@@ -980,3 +980,4 fa: | |||||
980 | text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it. |
|
980 | text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it. | |
981 | text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel. |
|
981 | text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel. | |
982 | notice_issue_successful_create: Issue %{id} created. |
|
982 | notice_issue_successful_create: Issue %{id} created. | |
|
983 | label_between: between |
@@ -998,3 +998,4 fi: | |||||
998 | text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it. |
|
998 | text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it. | |
999 | text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel. |
|
999 | text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel. | |
1000 | notice_issue_successful_create: Issue %{id} created. |
|
1000 | notice_issue_successful_create: Issue %{id} created. | |
|
1001 | label_between: between |
@@ -939,6 +939,7 fr: | |||||
939 | enumeration_activities: Activités (suivi du temps) |
|
939 | enumeration_activities: Activités (suivi du temps) | |
940 | label_greater_or_equal: ">=" |
|
940 | label_greater_or_equal: ">=" | |
941 | label_less_or_equal: "<=" |
|
941 | label_less_or_equal: "<=" | |
|
942 | label_between: entre | |||
942 | label_view_all_revisions: Voir toutes les révisions |
|
943 | label_view_all_revisions: Voir toutes les révisions | |
943 | label_tag: Tag |
|
944 | label_tag: Tag | |
944 | label_branch: Branche |
|
945 | label_branch: Branche |
@@ -989,3 +989,4 gl: | |||||
989 | text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it. |
|
989 | text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it. | |
990 | text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel. |
|
990 | text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel. | |
991 | notice_issue_successful_create: Issue %{id} created. |
|
991 | notice_issue_successful_create: Issue %{id} created. | |
|
992 | label_between: between |
@@ -982,3 +982,4 he: | |||||
982 | text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it. |
|
982 | text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it. | |
983 | text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel. |
|
983 | text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel. | |
984 | notice_issue_successful_create: Issue %{id} created. |
|
984 | notice_issue_successful_create: Issue %{id} created. | |
|
985 | label_between: between |
@@ -984,3 +984,4 hr: | |||||
984 | text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it. |
|
984 | text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it. | |
985 | text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel. |
|
985 | text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel. | |
986 | notice_issue_successful_create: Issue %{id} created. |
|
986 | notice_issue_successful_create: Issue %{id} created. | |
|
987 | label_between: between |
@@ -996,3 +996,4 | |||||
996 | text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it. |
|
996 | text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it. | |
997 | text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel. |
|
997 | text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel. | |
998 | notice_issue_successful_create: Issue %{id} created. |
|
998 | notice_issue_successful_create: Issue %{id} created. | |
|
999 | label_between: between |
@@ -985,3 +985,4 id: | |||||
985 | text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it. |
|
985 | text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it. | |
986 | text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel. |
|
986 | text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel. | |
987 | notice_issue_successful_create: Issue %{id} created. |
|
987 | notice_issue_successful_create: Issue %{id} created. | |
|
988 | label_between: between |
@@ -978,3 +978,4 it: | |||||
978 | text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it. |
|
978 | text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it. | |
979 | text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel. |
|
979 | text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel. | |
980 | notice_issue_successful_create: Issue %{id} created. |
|
980 | notice_issue_successful_create: Issue %{id} created. | |
|
981 | label_between: between |
@@ -1007,3 +1007,4 ja: | |||||
1007 | label_issues_visibility_public: プライベートチケット以外 |
|
1007 | label_issues_visibility_public: プライベートチケット以外 | |
1008 | text_issues_destroy_descendants_confirmation: %{count}個の子チケットも削除されます。 |
|
1008 | text_issues_destroy_descendants_confirmation: %{count}個の子チケットも削除されます。 | |
1009 | notice_issue_successful_create: Issue %{id} created. |
|
1009 | notice_issue_successful_create: Issue %{id} created. | |
|
1010 | label_between: between |
@@ -1029,3 +1029,4 ko: | |||||
1029 | text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it. |
|
1029 | text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it. | |
1030 | text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel. |
|
1030 | text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel. | |
1031 | notice_issue_successful_create: Issue %{id} created. |
|
1031 | notice_issue_successful_create: Issue %{id} created. | |
|
1032 | label_between: between |
@@ -1037,3 +1037,4 lt: | |||||
1037 | text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it. |
|
1037 | text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it. | |
1038 | text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel. |
|
1038 | text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel. | |
1039 | notice_issue_successful_create: Issue %{id} created. |
|
1039 | notice_issue_successful_create: Issue %{id} created. | |
|
1040 | label_between: between |
@@ -972,3 +972,4 lv: | |||||
972 | text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it. |
|
972 | text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it. | |
973 | text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel. |
|
973 | text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel. | |
974 | notice_issue_successful_create: Issue %{id} created. |
|
974 | notice_issue_successful_create: Issue %{id} created. | |
|
975 | label_between: between |
@@ -977,3 +977,4 mk: | |||||
977 | text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it. |
|
977 | text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it. | |
978 | text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel. |
|
978 | text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel. | |
979 | notice_issue_successful_create: Issue %{id} created. |
|
979 | notice_issue_successful_create: Issue %{id} created. | |
|
980 | label_between: between |
@@ -978,3 +978,4 mn: | |||||
978 | text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it. |
|
978 | text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it. | |
979 | text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel. |
|
979 | text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel. | |
980 | notice_issue_successful_create: Issue %{id} created. |
|
980 | notice_issue_successful_create: Issue %{id} created. | |
|
981 | label_between: between |
@@ -959,3 +959,4 nl: | |||||
959 | text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it. |
|
959 | text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it. | |
960 | text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel. |
|
960 | text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel. | |
961 | notice_issue_successful_create: Issue %{id} created. |
|
961 | notice_issue_successful_create: Issue %{id} created. | |
|
962 | label_between: between |
@@ -964,3 +964,4 | |||||
964 | text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it. |
|
964 | text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it. | |
965 | text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel. |
|
965 | text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel. | |
966 | notice_issue_successful_create: Issue %{id} created. |
|
966 | notice_issue_successful_create: Issue %{id} created. | |
|
967 | label_between: between |
@@ -994,3 +994,4 pl: | |||||
994 | text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it. |
|
994 | text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it. | |
995 | text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel. |
|
995 | text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel. | |
996 | notice_issue_successful_create: Issue %{id} created. |
|
996 | notice_issue_successful_create: Issue %{id} created. | |
|
997 | label_between: between |
@@ -998,3 +998,4 pt-BR: | |||||
998 | text_scm_config: Você pode configurar seus comandos de versionamento em config/configurations.yml. Por favor reinicie a aplicação após alterá-lo. |
|
998 | text_scm_config: Você pode configurar seus comandos de versionamento em config/configurations.yml. Por favor reinicie a aplicação após alterá-lo. | |
999 | text_scm_command_not_available: Comando de versionamento não disponível. Por favor verifique as configurações no painel de administração. |
|
999 | text_scm_command_not_available: Comando de versionamento não disponível. Por favor verifique as configurações no painel de administração. | |
1000 | notice_issue_successful_create: Issue %{id} created. |
|
1000 | notice_issue_successful_create: Issue %{id} created. | |
|
1001 | label_between: between |
@@ -982,3 +982,4 pt: | |||||
982 | text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it. |
|
982 | text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it. | |
983 | text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel. |
|
983 | text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel. | |
984 | notice_issue_successful_create: Issue %{id} created. |
|
984 | notice_issue_successful_create: Issue %{id} created. | |
|
985 | label_between: between |
@@ -970,3 +970,4 ro: | |||||
970 | text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it. |
|
970 | text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it. | |
971 | text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel. |
|
971 | text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel. | |
972 | notice_issue_successful_create: Issue %{id} created. |
|
972 | notice_issue_successful_create: Issue %{id} created. | |
|
973 | label_between: between |
@@ -1090,3 +1090,4 ru: | |||||
1090 | text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it. |
|
1090 | text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it. | |
1091 | text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel. |
|
1091 | text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel. | |
1092 | notice_issue_successful_create: Issue %{id} created. |
|
1092 | notice_issue_successful_create: Issue %{id} created. | |
|
1093 | label_between: between |
@@ -972,3 +972,4 sk: | |||||
972 | text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it. |
|
972 | text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it. | |
973 | text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel. |
|
973 | text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel. | |
974 | notice_issue_successful_create: Issue %{id} created. |
|
974 | notice_issue_successful_create: Issue %{id} created. | |
|
975 | label_between: between |
@@ -973,3 +973,4 sl: | |||||
973 | text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it. |
|
973 | text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it. | |
974 | text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel. |
|
974 | text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel. | |
975 | notice_issue_successful_create: Issue %{id} created. |
|
975 | notice_issue_successful_create: Issue %{id} created. | |
|
976 | label_between: between |
@@ -977,3 +977,4 sr-YU: | |||||
977 | text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it. |
|
977 | text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it. | |
978 | text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel. |
|
978 | text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel. | |
979 | notice_issue_successful_create: Issue %{id} created. |
|
979 | notice_issue_successful_create: Issue %{id} created. | |
|
980 | label_between: between |
@@ -978,3 +978,4 sr: | |||||
978 | text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it. |
|
978 | text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it. | |
979 | text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel. |
|
979 | text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel. | |
980 | notice_issue_successful_create: Issue %{id} created. |
|
980 | notice_issue_successful_create: Issue %{id} created. | |
|
981 | label_between: between |
@@ -1018,3 +1018,4 sv: | |||||
1018 | enumeration_activities: Aktiviteter (tidsuppföljning) |
|
1018 | enumeration_activities: Aktiviteter (tidsuppföljning) | |
1019 | enumeration_system_activity: Systemaktivitet |
|
1019 | enumeration_system_activity: Systemaktivitet | |
1020 | notice_issue_successful_create: Issue %{id} created. |
|
1020 | notice_issue_successful_create: Issue %{id} created. | |
|
1021 | label_between: between |
@@ -974,3 +974,4 th: | |||||
974 | text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it. |
|
974 | text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it. | |
975 | text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel. |
|
975 | text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel. | |
976 | notice_issue_successful_create: Issue %{id} created. |
|
976 | notice_issue_successful_create: Issue %{id} created. | |
|
977 | label_between: between |
@@ -996,3 +996,4 tr: | |||||
996 | text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it. |
|
996 | text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it. | |
997 | text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel. |
|
997 | text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel. | |
998 | notice_issue_successful_create: Issue %{id} created. |
|
998 | notice_issue_successful_create: Issue %{id} created. | |
|
999 | label_between: between |
@@ -973,3 +973,4 uk: | |||||
973 | text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it. |
|
973 | text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it. | |
974 | text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel. |
|
974 | text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel. | |
975 | notice_issue_successful_create: Issue %{id} created. |
|
975 | notice_issue_successful_create: Issue %{id} created. | |
|
976 | label_between: between |
@@ -1028,3 +1028,4 vi: | |||||
1028 | text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it. |
|
1028 | text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it. | |
1029 | text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel. |
|
1029 | text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel. | |
1030 | notice_issue_successful_create: Issue %{id} created. |
|
1030 | notice_issue_successful_create: Issue %{id} created. | |
|
1031 | label_between: between |
@@ -1058,3 +1058,4 | |||||
1058 | enumeration_activities: 活動 (時間追蹤) |
|
1058 | enumeration_activities: 活動 (時間追蹤) | |
1059 | enumeration_system_activity: 系統活動 |
|
1059 | enumeration_system_activity: 系統活動 | |
1060 | notice_issue_successful_create: Issue %{id} created. |
|
1060 | notice_issue_successful_create: Issue %{id} created. | |
|
1061 | label_between: between |
@@ -980,3 +980,4 zh: | |||||
980 | text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it. |
|
980 | text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it. | |
981 | text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel. |
|
981 | text_scm_command_not_available: Scm command is not available. Please check settings on the administration panel. | |
982 | notice_issue_successful_create: Issue %{id} created. |
|
982 | notice_issue_successful_create: Issue %{id} created. | |
|
983 | label_between: between |
@@ -127,6 +127,10 class ActiveSupport::TestCase | |||||
127 | def assert_error_tag(options={}) |
|
127 | def assert_error_tag(options={}) | |
128 | assert_tag({:attributes => { :id => 'errorExplanation' }}.merge(options)) |
|
128 | assert_tag({:attributes => { :id => 'errorExplanation' }}.merge(options)) | |
129 | end |
|
129 | end | |
|
130 | ||||
|
131 | def assert_include(expected, s) | |||
|
132 | assert s.include?(expected), "\"#{expected}\" not found in \"#{s}\"" | |||
|
133 | end | |||
130 |
|
134 | |||
131 | # Shoulda macros |
|
135 | # Shoulda macros | |
132 | def self.should_render_404 |
|
136 | def self.should_render_404 |
@@ -130,6 +130,21 class QueryTest < ActiveSupport::TestCase | |||||
130 | assert query.statement.include?("CAST(custom_values.value AS decimal(60,3)) <= 30") |
|
130 | assert query.statement.include?("CAST(custom_values.value AS decimal(60,3)) <= 30") | |
131 | find_issues_with_query(query) |
|
131 | find_issues_with_query(query) | |
132 | end |
|
132 | end | |
|
133 | ||||
|
134 | def test_operator_between | |||
|
135 | query = Query.new(:project => Project.find(1), :name => '_') | |||
|
136 | query.add_filter('done_ratio', '><', ['30', '40']) | |||
|
137 | assert_include "#{Issue.table_name}.done_ratio BETWEEN 30 AND 40", query.statement | |||
|
138 | find_issues_with_query(query) | |||
|
139 | end | |||
|
140 | ||||
|
141 | def test_operator_between_on_custom_field | |||
|
142 | f = IssueCustomField.create!(:name => 'filter', :field_format => 'int', :is_filter => true, :is_for_all => true) | |||
|
143 | query = Query.new(:project => Project.find(1), :name => '_') | |||
|
144 | query.add_filter("cf_#{f.id}", '><', ['30', '40']) | |||
|
145 | assert_include "CAST(custom_values.value AS decimal(60,3)) BETWEEN 30 AND 40", query.statement | |||
|
146 | find_issues_with_query(query) | |||
|
147 | end | |||
133 |
|
148 | |||
134 | def test_operator_in_more_than |
|
149 | def test_operator_in_more_than | |
135 | Issue.find(7).update_attribute(:due_date, (Date.today + 15)) |
|
150 | Issue.find(7).update_attribute(:due_date, (Date.today + 15)) |
General Comments 0
You need to be logged in to leave comments.
Login now