Fix issues count on project view

parent f2ba4e3d
...@@ -301,7 +301,7 @@ module ApplicationHelper ...@@ -301,7 +301,7 @@ module ApplicationHelper
if project.nil? if project.nil?
nil nil
elsif current_controller?(:issues) elsif current_controller?(:issues)
project.issues.send(entity).count project.issues.visible_to_user(current_user).send(entity).count
elsif current_controller?(:merge_requests) elsif current_controller?(:merge_requests)
project.merge_requests.send(entity).count project.merge_requests.send(entity).count
end end
......
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
%span %span
Issues Issues
- if @project.default_issues_tracker? - if @project.default_issues_tracker?
%span.count.issue_counter= number_with_delimiter(@project.issues.opened.count) %span.count.issue_counter= number_with_delimiter(@project.issues.visible_to_user(current_user).opened.count)
- if project_nav_tab? :merge_requests - if project_nav_tab? :merge_requests
= nav_link(controller: :merge_requests) do = nav_link(controller: :merge_requests) do
......
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