Repository navigation
fix(users): ignore words made only of removed characters in the login suggestion - #21
Merged
Merged
Conversation
… suggestion
Characters outside the login rule were removed after picking the first
and last words, so a lone symbol left a stray dot ("Ana Souza '" gave
"ana."). Each word is now cleaned first and empty words are dropped
(USR-15).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #19, found in the post-merge review of issue #5. No issue to close.
What
LoginSuggestionnow normalizes and cleans each word of the full name before picking the first and last words, and drops words that become empty.ana.ana.souza.souzaana.souzaWhy
USR-15 says characters outside the login rule (apostrophes, extra spaces, symbols) are removed. They were removed only after the first and last words were joined, so a word made only of such characters left the joining dot behind.
A hyphen is inside the login rule, so a lone hyphen is still kept as a word ("José Silva -" gives
jose.-), which is the literal reading of USR-15. Changing that would be a new rule for the owner to decide.How to test
From
backend/ControlService:dotnet build ControlService.slnx -v q -clp:Summary dotnet test --solution ControlService.slnx dotnet format ControlService.slnx --verify-no-changesResult: 0 warnings, 107 tests passing, formatting clean.
Checklist
Word_made_only_of_removed_characters_is_ignoredfailed with the outputs above before the fixdotnet test --solution ControlService.slnxpasses locallydocs/product/, ADRs, README) when behavior or decisions changed: none needed, the code now matches USR-15