Work item label links result in 404 for project level work items

Summary

Clicking a label in a project level work item goes to an invalid link.

Steps to reproduce

  1. Open any project level work item (task, objective, key result)
  2. Add a label if there isn't one
  3. Click the label

Example Project

gitlab

What is the current bug behavior?

Link results in 404

What is the expected correct behavior?

Link points to /issues or /epics (based on type) with label filter applied.

Relevant logs and/or screenshots

Work item group epic link: https://gitlab.com/groups/gitlab-com/-/epics?label_name\[\]=group%3A%3Athreat%20insights

Work item project objective link: https://gitlab.com/groups/gitlab-OKRs/-/epics?label_name\[\]=group%3A%3Athreat%20insights

Output of checks

Results of GitLab environment info

Expand for output related to GitLab environment info

(For installations with omnibus-gitlab package run and paste the output of: \\\`sudo gitlab-rake gitlab:env:info\\\`) (For installations from source run and paste the output of: \\\`sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production\\\`)

Results of GitLab application Check

Expand for output related to the GitLab application check

(For installations with omnibus-gitlab package run and paste the output of: \`sudo gitlab-rake gitlab:check SANITIZE=true\`) (For installations from source run and paste the output of: \`sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true\`) (we will only investigate if the tests are passing)

Possible fixes

Edited by Nick Leonard