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:
authorRémy Coutable <remy@rymai.me>2016-09-22 15:39:13 +0300
committerRémy Coutable <remy@rymai.me>2016-09-22 15:39:13 +0300
commitdfc2fe774de3a1768afe4e2fb24f32858b430da5 (patch)
treee48fe78c941cb3d42700eeeada4d912775fd0c46 /app/helpers/application_helper.rb
parent2450625bbc1a9838b4ab76b652dfa1899c777927 (diff)
Revert "Merge branch '22421-fix-issuable-counter-when-more-than-one-label-is-selected' into 'master' "
This reverts commit 8ed5be5935a77fffe730baa188d1e1fc1c739d72, reversing changes made to fb0d1378f4f3365a9cae0938829da0560a92b6e6.
Diffstat (limited to 'app/helpers/application_helper.rb')
-rw-r--r--app/helpers/application_helper.rb15
1 files changed, 2 insertions, 13 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 2163a437c48..ed41bf04fc0 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -286,19 +286,8 @@ module ApplicationHelper
}
state_title = titles[state] || state.to_s.humanize
- records_with_state = records.public_send(state)
-
- # When filtering by multiple labels, the result of query.count is a Hash
- # of the form { issuable_id1 => N, issuable_id2 => N }, where N is the
- # number of labels selected. The ugly "trick" is to load the issuables
- # as an array and get the size of the array...
- # We should probably try to solve this properly in the future.
- # See https://gitlab.com/gitlab-org/gitlab-ce/issues/22414
- label_names = Array(params.fetch(:label_name, []))
- records_with_state = records_with_state.to_a if label_names.many?
-
- count = records_with_state.size
- html = content_tag :span, state_title
+ count = records.public_send(state).size
+ html = content_tag :span, state_title
if count.present?
html += " "