Nav bar issue count does not include confidential issues

Summary

Nav bar issue count does not include confidential issues

Steps to reproduce

  • Create a new project
  • Create a non confidential issue
  • Create a confidential issue
  • Navigate to the issue list

Example Project

https://gitlab.com/issue-reproduce/confidential-issues-count/issues

What is the current bug behavior?

Notice that the nav bar issue count does not reflect the issue list counter even if access to confidential issues is granted

What is the expected correct behavior?

The nav bar's issue count should reflect the count in the issue list.

If we wanted to cache the count you see when viewing the list, we'd need to have:

  1. A cache key for project members.

  2. A cache key for anonymous users.

  3. A cache key for every single non-member user who viewed the project. That's because it still wouldn't be accurate unless we checked things for that user specifically, because they may be the author or assignee of some confidential issues.

For a busy public project like this one, 3 is a lot - so many that it's unworkable.

Therefore, we should cache for project members vs. non project members. This will make the number more accurate than it is today. It will only be off by a small number for the small number of users who create or are assigned a confidential issue as a non-project member.

Relevant logs and/or screenshots

Screen_Shot_2017-10-30_at_19.16.42

Output of checks

gitlab-ce~3293941 v10.1.0

Edited Sep 02, 2020 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading