Ancestor labels do not show up on subgroup project label pages
Summary
On the issue label page for a project, group labels are listed mixed with project labels. Since gitlab-ce#40915, it is possible to assign labels from any ancestor group in a project within a subgroup. However, these ancestor labels do not show up on the label page.
Steps to reproduce
Have a top-level group "G" with a group label "L" and a project "GP". Within "G", have a subgroup "S" with a project "GS". While the label page for "GP" does list "L", the label page for "GS" doesn't.
Example Project
Take a look at the "F30 Subgroup Bug Demo" group. The label page for "Group Project" does show "demo-label", the one for "Subgroup Project" doesn't. However, "demo-label" can actually be assigned in "Subgroup Project" as shown by "Demo Label Issue".
What is the current bug behavior?
Labels from top-level groups are not listed on subgroup project label pages. Presumably, only labels from direct parent groups are shown, but I haven't tested nested subgroups.
What is the expected correct behavior?
I, for one, find it rather confusing that group labels are shown on the project label page, mixed with project labels, at all. But at least the behavior should be consistent between parent and other ancestor groups.
Arguably, if you decide to show ancestor labels for subgroup projects, you should additionally show them on the subgroup label page.
GitLab environment info
Reproduced on GitLab.com as well as on a self-hosted GitLab CE 10.7.3 instance.