Open requested to merge nivviv/gitlab-ce:28795-include-slug-in-internalid into master
What does this MR do?
Show the title of models that have a InternalID in the url.
- Works for Issues, Merge Requests, and Milestones.
- Slugs are always lowercase and can only contain a-z, 0-9, and -.
- The slug is generated at runtime when the owning model has a :title attr; it is not stored on the model.
- The slug generation is in InternalId#make_iid_slug, as the two are closely linked.
- No link rel=canonical.
- The url in the browser is not updated with replaceState yet when coming from other places with a old/different slug.
- No specs yet, as specs don't go through to_param so they never see the slug, as far as I can tell. Should this be changed?
Possibly room for improvement:
- The route constraint RX could maybe be moved elsewhere?
- The model scope/finder (where: iid) still works even with sluggified IIDs because to_i just truncates after the -. I think this is fine?
- Also, better slug pattern?
Are there points in the code the reviewer needs to double check?
Ah, all of them! I'd like to bounce off for feedback and then work the rest out.
Why was this MR needed?
Feature request in #28795 (moved)
Screenshots (if relevant)
Does this MR meet the acceptance criteria?
Changelog entry added
API support added
Added for this feature/bug
All builds are passing
Conform by the merge request performance guides
Conform by the style guides
Branch has no merge conflicts with
master(if it does - rebase it please)
Squashed related commits together
What are the relevant issue numbers?
Closes #28795 (moved)