Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/dashboard_controller.rb')
-rw-r--r--app/controllers/dashboard_controller.rb15
1 files changed, 8 insertions, 7 deletions
diff --git a/app/controllers/dashboard_controller.rb b/app/controllers/dashboard_controller.rb
index f94da77609f..f25cc1bbc32 100644
--- a/app/controllers/dashboard_controller.rb
+++ b/app/controllers/dashboard_controller.rb
@@ -20,10 +20,6 @@ class DashboardController < Dashboard::ApplicationController
urgency :low, [:merge_requests]
- before_action only: [:merge_requests] do
- push_frontend_feature_flag(:mr_attention_requests, default_enabled: :yaml)
- end
-
def activity
respond_to do |format|
format.html
@@ -71,10 +67,15 @@ class DashboardController < Dashboard::ApplicationController
end
def check_filters_presence!
- no_scalar_filters_set = finder_type.scalar_params.none? { |k| params.key?(k) }
- no_array_filters_set = finder_type.array_params.none? { |k, _| params.key?(k) }
+ no_scalar_filters_set = finder_type.scalar_params.none? { |k| params[k].present? }
+ no_array_filters_set = finder_type.array_params.none? { |k, _| params[k].present? }
+
+ # The `in` param is a modifier of `search`. If it's present while the `search`
+ # param isn't, the finder won't use the `in` param. We consider this as a no
+ # filter scenario.
+ no_search_filter_set = params[:in].present? && params[:search].blank?
- @no_filters_set = no_scalar_filters_set && no_array_filters_set
+ @no_filters_set = (no_scalar_filters_set && no_array_filters_set) || no_search_filter_set
return unless @no_filters_set