When editing an item's name (site, device, ...) with slugs already populated, the javascript shouldn't automatically regenerate and clobber the existing slug. Would be nice to include a refresh (↺) icon next to the slug name for those who do want the slug to update with the generated value.
Updating the slug on the edit pages breaks any shared links (i.e. from a wiki page for documentation) or breaks the already chosen slug format (imported data including a slug). My use case is an already existing database in which we imported the data. But any typo's in the name that were discovered or when the site name changes (rare but acquisitions do happen) causes the per-determined slug to be invalidated. With my current employer and my previous employer, for sites alone this is well in excess of 100+, and 75+ for multi-hierarchy regions.
Generating the slug makes complete sense when creating an ad-hoc entry, but not editing an existing one IMHO.
None
AFAICT, none
But any typo's in the name that were discovered or when the site name changes (rare but acquisitions do happen) causes the per-determined slug to be invalidated.
But that means correcting the name automatically corrects the slug, right? I wouldn't think you'd want to keep the erroneous slug. Yes, it means updating any referring links from external sources, but that's the cost of not validating data prior to import.
Fair point. However I don't feel that it invalidates the 2nd portion in which slugs are generated on import. Re-reading my initial request I seem to have not communicated this well.
I set many of the slugs because we already had uniqueness and it's required for import. For example, device roles I had 'Edge fabric switch'='efs' instead of 'edge-fabric-switch', Sites already had small site codes 'Equinix DA2'='EQ-DA2'. Automatically updating the slug (even by accident) seems to have undesirable results for me.
Being it's all in the javascript, I'm assuming it isn't something we can create a config setting for unfortunately.
But that means correcting the name automatically corrects the slug, right? I wouldn't think you'd want to keep the erroneous slug.
In my case, I do want to keep the original ("erroneous") slug.
I am planning to use the slug as a stable reference for another system. If the user-readable description is changed, I want the slug to be kept the same.
I think the solution could be as simple as:
(*) Or even more simply: you could leave the field empty in the UI. On save, if the slug is empty, then auto-generate one. If there is a conflict with existing slug, the record will fail to save.
This also has the benefit that if you want to "reset" the slug you can just set it to empty field and save; no need for a "refresh" button.
Disabled auto-reslugification for existing objects and added a button to manually regenerate it:

Most helpful comment
Disabled auto-reslugification for existing objects and added a button to manually regenerate it: