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
path: root/app
diff options
context:
space:
mode:
authorIgor <idrozdov@gitlab.com>2019-04-04 17:54:25 +0300
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2019-04-04 17:54:25 +0300
commit5b6db251a8b8d4528ed161b0462a62ab0bdba458 (patch)
treed38dd0c0ee458213cffcb517147860a93dff0c7c /app
parentb99b6bb0960f749e1ba9a129be9c0365e306ed96 (diff)
Consider array params on rendering MR list on dashboard
This fixes the bug, when approver filter is provided, but dashboard asks to enter any filter
Diffstat (limited to 'app')
-rw-r--r--app/controllers/dashboard_controller.rb5
-rw-r--r--app/finders/issuable_finder.rb1
2 files changed, 4 insertions, 2 deletions
diff --git a/app/controllers/dashboard_controller.rb b/app/controllers/dashboard_controller.rb
index 75329b05a6f..1a97b39d3ae 100644
--- a/app/controllers/dashboard_controller.rb
+++ b/app/controllers/dashboard_controller.rb
@@ -46,7 +46,10 @@ class DashboardController < Dashboard::ApplicationController
end
def check_filters_presence!
- @no_filters_set = finder_type.scalar_params.none? { |k| params.key?(k) }
+ 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_filters_set = no_scalar_filters_set && no_array_filters_set
return unless @no_filters_set
diff --git a/app/finders/issuable_finder.rb b/app/finders/issuable_finder.rb
index 6eab8c5ee51..b6be2895d85 100644
--- a/app/finders/issuable_finder.rb
+++ b/app/finders/issuable_finder.rb
@@ -53,7 +53,6 @@ class IssuableFinder
assignee_username
author_id
author_username
- label_name
milestone_title
my_reaction_emoji
search