diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index fb1c576..8025883 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -1,3 +1,4 @@ + # Redmine - project management software # Copyright (C) 2006-2013 Jean-Philippe Lang # diff --git a/app/models/issue_query.rb b/app/models/issue_query.rb index 4709325..383391a 100644 --- a/app/models/issue_query.rb +++ b/app/models/issue_query.rb @@ -66,7 +66,7 @@ class IssueQuery < Query versions = [] categories = [] issue_custom_fields = [] - + if project principals += project.principals.sort unless project.leaf? @@ -389,6 +389,9 @@ class IssueQuery < Query op = (operator == "!p" ? 'NOT IN' : 'IN') comp = (operator == "=!p" ? '<>' : '=') "#{Issue.table_name}.id #{op} (SELECT DISTINCT #{IssueRelation.table_name}.#{join_column} FROM #{IssueRelation.table_name}, #{Issue.table_name} relissues WHERE #{IssueRelation.table_name}.relation_type = '#{connection.quote_string(relation_type)}' AND #{IssueRelation.table_name}.#{target_join_column} = relissues.id AND relissues.project_id #{comp} #{value.first.to_i})" + when "!|c", "*&o" + op = (operator == "!|c" ? 'NOT IN' : 'IN') + "#{Issue.table_name}.id #{op} (SELECT DISTINCT #{IssueRelation.table_name}.#{join_column} FROM #{IssueRelation.table_name}, #{Issue.table_name} relissues WHERE #{IssueRelation.table_name}.relation_type = '#{connection.quote_string(relation_type)}' AND #{IssueRelation.table_name}.#{target_join_column} = relissues.id AND relissues.status_id IN (SELECT id FROM #{IssueStatus.table_name} WHERE is_closed=#{connection.quoted_false}))" end if relation_options[:sym] == field && !options[:reverse] diff --git a/app/models/query.rb b/app/models/query.rb index a5e7abd..918c0e8 100644 --- a/app/models/query.rb +++ b/app/models/query.rb @@ -159,7 +159,9 @@ class Query < ActiveRecord::Base "!~" => :label_not_contains, "=p" => :label_any_issues_in_project, "=!p" => :label_any_issues_not_in_project, - "!p" => :label_no_issues_in_project + "!p" => :label_no_issues_in_project, + "*&o" => :label_any_open_issues, + "!|c" => :label_none_or_closed_issues } class_attribute :operators_by_filter_type @@ -174,7 +176,7 @@ class Query < ActiveRecord::Base :text => [ "~", "!~", "!*", "*" ], :integer => [ "=", ">=", "<=", "><", "!*", "*" ], :float => [ "=", ">=", "<=", "><", "!*", "*" ], - :relation => ["=", "=p", "=!p", "!p", "!*", "*"] + :relation => ["=", "=p", "=!p", "!p", "*&o", "!|c", "!*", "*"] } class_attribute :available_columns @@ -233,7 +235,7 @@ class Query < ActiveRecord::Base # filter requires one or more values (values_for(field) and !values_for(field).first.blank?) or # filter doesn't require any value - ["o", "c", "!*", "*", "t", "ld", "w", "lw", "l2w", "m", "lm", "y"].include? operator_for(field) + ["o", "c", "!*", "*", "t", "ld", "w", "lw", "l2w", "m", "lm", "y", "*&o", "!|c"].include? operator_for(field) end if filters end diff --git a/config/locales/en-GB.yml b/config/locales/en-GB.yml index ceaba1e..2828c14 100644 --- a/config/locales/en-GB.yml +++ b/config/locales/en-GB.yml @@ -1065,6 +1065,8 @@ en-GB: permission_view_private_notes: View private notes permission_set_notes_private: Set notes as private label_no_issues_in_project: no issues in project + label_any_open_issues: any open issues + label_none_or_closed_issues: none or closed issues label_any: all label_last_n_weeks: last %{count} weeks setting_cross_project_subtasks: Allow cross-project subtasks diff --git a/config/locales/en.yml b/config/locales/en.yml index 135d078..ed3072c 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -683,6 +683,8 @@ en: label_any_issues_in_project: any issues in project label_any_issues_not_in_project: any issues not in project label_no_issues_in_project: no issues in project + label_any_open_issues: any open issues + label_none_or_closed_issues: none or closed issues label_day_plural: days label_repository: Repository label_repository_new: New repository diff --git a/public/javascripts/application.js b/public/javascripts/application.js index a19ff23..41ad249 100644 --- a/public/javascripts/application.js +++ b/public/javascripts/application.js @@ -251,6 +251,8 @@ function toggleOperator(field) { case "y": case "o": case "c": + case "!|c": + case "*&o": enableValues(field, []); break; case "><": @@ -551,12 +553,12 @@ function warnLeavingUnsaved(message) { function setupAjaxIndicator() { $('#ajax-indicator').bind('ajaxSend', function(event, xhr, settings) { - + if ($('.ajax-loading').length === 0 && settings.contentType != 'application/octet-stream') { $('#ajax-indicator').show(); } }); - + $('#ajax-indicator').bind('ajaxStop', function() { $('#ajax-indicator').hide(); }); diff --git a/tmp/pdf/empty b/tmp/pdf/empty deleted file mode 100644 index e69de29..0000000 diff --git a/tmp/test/empty b/tmp/test/empty deleted file mode 100644 index e69de29..0000000 diff --git a/tmp/thumbnails/empty b/tmp/thumbnails/empty deleted file mode 100644 index e69de29..0000000