Skip to content

Sidebar section "Labels" for Merge Requests does not appear

Summary

When the user comes to a URL for one of the tabs on a Merge Request (e.g. the "Commits" tab), the "Labels" section in the sidebar does not appear.

Steps to reproduce

Go to https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7402/commits. The "Labels" section is not in the sidebar.

(Note that if you go to https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7402 instead, the "Labels" section is there)

Expected behavior

The "Labels" section should appear regardless of which tab you enter onto.

Actual behavior

The "Labels" section only appears if you enter onto the default (Discussion) tab.

Possible fixes

The @labels variable is nil on the following line of code when going to a tab's URL: https://gitlab.com/gitlab-org/gitlab-ce/blob/master/app/views/shared/issuable/_sidebar.html.haml#L110

I'm thinking we need to investigate why @labels isn't being set for those URLs.

I'm happy to tackle this one if someone wants to assign it to me 😄