Fix issues count on labels page

parent 0a8c9f72
......@@ -97,12 +97,12 @@ class Label < ActiveRecord::Base
end
end
def open_issues_count
issues.opened.count
def open_issues_count(user = nil)
issues.visible_to_user(user).opened.count
end
def closed_issues_count
issues.closed.count
def closed_issues_count(user = nil)
issues.visible_to_user(user).closed.count
end
def open_merge_requests_count
......
......@@ -8,7 +8,7 @@
%strong.append-right-20
= link_to_label(label) do
= pluralize label.open_issues_count, 'open issue'
= pluralize label.open_issues_count(current_user), 'open issue'
- if current_user
.label-subscription{data: {url: toggle_subscription_namespace_project_label_path(@project.namespace, @project, label)}}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment