Group issue tracker shows labels from archived projects

Summary

When viewing the issues for a group, all of the labels used within the group are shown. This list includes labels from any projects that have been archived.

Steps to reproduce

  1. Create a group
  2. Create a project in the group
  3. Create an issue with a new label
  4. Archive the project
  5. Go to the group issue tracker and observe the labels shown in the dropdown

Example group: https://gitlab.com/groups/archive-label-example/issues
Archived project: https://gitlab.com/archive-label-example/archived1/issues

Expected behavior

Issues from archived projects are not shown, so the labels should not be shown either

Actual behavior

The issue tracker labels dropdown includes those from archived projects.

Relevant logs and/or screenshots

2017-01-05_13-52-30

Example group: https://gitlab.com/groups/archive-label-example/issues
Archived project: https://gitlab.com/archive-label-example/archived1/issues

Output of checks

This bug happens on GitLab.com

Results of GitLab application Check

This bug happens on GitLab.com

Results of GitLab environment info

This bug happens on GitLab.com

Possible fixes

(If you can, link to the line of code that might be responsible for the problem)

Assignee Loading
Time tracking Loading