Header badge includes counts for issues/MRs from archived projects
In the header on the right hand side, the issue and merge request counter displays all issues and merge requests. Even those from archived projects are shown. If you click on the link, the list will display results without those issues/MRs from archived projects.
Steps to reproduce
Create a new project with one issue assigned to yourself.
Archive this newly created project.
See the counter in the header not changing and click on it to see your search result without the issue in the archived project.
https://gitlab.com/schwedenmut/project_to_archive was created like stated in the Steps to reproduce.
What is the current bug behavior?
The header displays the wrong quantity of issues/MRs.
What is the expected correct behavior?
Like the list after clicking on the issue link in the header, those icons should only display issues/MRs which are in a not read-only (archived) project.
Relevant logs and/or screenshots
Output of checks
This bug happens on GitLab.com and on my freshly updated CE 10.6.3.
https://gitlab.com/gitlab-org/gitlab-ce/blob/master/app/views/layouts/header/_default.html.haml#L34 refers to
assigned_issuables_count in https://gitlab.com/gitlab-org/gitlab-ce/blob/master/app/helpers/issuables_helper.rb#L183 which uses
current_user.assigned_open_merge_requests_count from https://gitlab.com/gitlab-org/gitlab-ce/blob/master/app/models/user.rb#L1027.
current_user.assigned_open_merge_requests_count (which instantiates
app/finders/issues_finder.rb) should return the same result like the dashboard (/dashboard/issues?assignee_id=current_user.ID)