Skip to content

Fix direct access to individual design on deprecated issue route

What does this MR do?

This MR fixes a bug when directly accessing an individual Design Management design on the deprecated issue route.

71d92460 introduced a change to issue routes, deprecating the old ones, but still supporting them. There was added a special variable in issues/_discussion.html.haml to inform the Vue app about which of the two possible routes the Vue app was mounted on.

The calculation of deprecated_route was previously only returning true if the user was looking at:

  • issues/1
  • issues/1/designs

But not:

  • issues/1/designs/mydesign.png

In Rails, everything after the designs segment of the route is wildcarded as a single param[:vueroute] so it can be handled by Vue.

An example of an affected route is:

https://gitlab.com/gitlab-org/gitlab/issues/22702/designs/Wiki%20editing.png

which at time of writing does not work. Whereas the non-deprecated route:

https://gitlab.com/gitlab-org/gitlab/-/issues/22702/designs/Wiki%20editing.png

does.

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Closes #211833 (closed)

Edited by 🤖 GitLab Bot 🤖

Merge request reports