Notes on effects of changing automatic (TL, etc.) group titles via site texts

I don’t know if anyone but @haydenjames might be interested in this, but I got curious about a secondary request in an otherwise solved topic about group PM inboxes:

…referring to:

Here’s what I can make out…

Since the equivalent field titles for user vs. group “names” overlap confusingly, I categorize them here as @ handle and proper name. Handles don’t allow spaces; proper names do.

@ handle proper name
users :detective: Username field (Agent_007) :label: Name field (James Bond)
admin created groups :label: Name field (poke_pros) :busts_in_silhouette: Full Name field (Pokemon Pros)
automatic groups :robot: hardcoded (trust_level_2) :ghost: not really…

Automatic groups, e.g. moderators, trust levels, etc. don’t have editable ‘handle’ and ‘proper name’ fields.

But automatic groups have site text names that can be edited:

This changes the appearance of the group heading on the Groups pages.
Maybe that’s something you’d like to do…

…but it doesn’t affect the Inbox, which displays the handle for all groups, automatic or otherwise:

I don’t know how much work it would be to pull in the proper name fields for display here instead of the handle, but if it’s minor, it would be a nice bit of polish.

EDIT: Realizing that while it might look nice to use the proper name in the inbox, it makes sense that it shows the handle that’s used for @-mentions.

If you want to rename an automatic group and give it a matching new handle, the new group title in site texts must be valid for that purpose, i.e. have no spaces in it.

I think changing the (eg) groups.default_names.trust_level_4 site text does end up updating it in other areas too. I believe it’s naturally part of a daily background job, but if you have access to your /sidekiq/scheduler page you can trigger the jobs::EnsureDbConsistency job manually from there to speed it up.


Ahh, but yes, spaces will be an issue as mentions/names can’t handle those. :cry:

1 Like

Well this is interesting..! JammyDodger’s reply led me to more experiments.

Renaming the automatic groups via the site text setting led to some confusion when spaces were involved, because spaces prevent them being used as handles. If the current derived handle isn’t overridden by the site text setting because of spaces, it stays as it was. I discovered this when I briefly got a no-spaces group title stuck as the handle.

Awareness of the impact of spaces and use of the Sidekiq job EnsureDbConsistency cleared things up.

I’ll amend my suggestion in the original post re. displaying proper names in the inbox, as that wouldn’t jive with the use of @-mentions, which require the handle.

Detailed testing steps
  1. Starting with my situation above, I confirmed that the Sideqik job had run, and ran it again anyway. Indeed it did not pick up the name changes for the inbox – because of the spaces, as you explained.

  2. Changed the site text for TL2 from “Trust Level 2” to “Sophomores” and ran the Sideqik job:

The name change now propagated, as both the group title and the inbox handle – because no spaces:

  1. Changed the site text name back to “Trust Level 2” and ran the Sidekiq job. The handle assigned in the previous operation is now stuck there – apparently because the spaces in that site text title don’t make for a valid handle:

  1. Reverted the site text to default “trust_level_2” and did not run the Sidekiq job. This updated the title but not the handle:

  1. Ran the Sidekiq job, which cleared the edited handle, resetting it to the default in the inbox:

1 Like

Sorry about that. :grimacing: I sometimes realise that I’ve jumped in too early and get ‘poster’s remorse’. :slight_smile: I’ll bring it back for posterity. :+1:

The quick input was very helpful! :grin:

1 Like