Skip to content

Explore topics: find topic by case insensitive name for detail page

What does this MR do and why?

This MR is the 4. step of #351871 (closed).

When the background migration in !81503 (merged) is completed (3. step), the topic names are case insensitive unique. That's because the background migration in !81503 (merged) merges topics with the same name but different upper/lower case:

Topic URL of detail page Result after background migration
html https://gitlab.com/explore/projects/topics/html Topic is kept, detail page still works
HTML https://gitlab.com/explore/projects/topics/HTML Topic is deleted, detail page results in a 404
Html https://gitlab.com/explore/projects/topics/Html Topic is deleted, detail page results in a 404

As a result, the URL of deleted topics results in a 404. But it would be more convenient if the URL redirects to the kept topic instead. So this MR ensures that the detail page still displays the remaining topic regardless of the upper/lower case in the URL.

🛠 with at Siemens

/cc @bufferoverflow

How to set up and validate locally

  1. Create a topic topic1 via the Admin Area (see docs) or the project settings (see docs).
  2. Visit the detail page of the topic: http://localhost:3000/explore/projects/topics/topic1
  3. Visit the detail page of the topic with other upper/lower case: http://localhost:3000/explore/projects/topics/TOPIC1

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports

Loading