Defect #1349
closedBug generator generates invalid username
100%
Description
Username generator generates invalid usernames eq:
first name: Peter
last name: Bimbo Šourek
generated username (eq): peter.bimbo sourek
please replace/remove all whitespaces with given configuration property.
Affected version <9.2.2
Updated by Ondřej Kopr about 6 years ago
Petr Michal wrote:
Imho default generator should cut name on first white space. Common behavior is to use peter.bimbo instead of peter.bimbosourek.
I have request from Vlada about this big bug, that I must add new parameter with character that replace white spaces. If you want cutoff everything after whitespace. The best way for now is create new generator, or I must implement new configuration property for this use case.
Updated by Ondřej Kopr about 6 years ago
- % Done changed from 0 to 60
New property for email and username generator was added - replaceWhiteSpacesCharacter. Configuration contains character/s that will be used for replace white spaces. Now is for example replace white space with another white space (usefull feature), or with dot.
Configuration is visible from frontend.
Missing replace new screenshots in documentation and tests.
Updated by Ondřej Kopr about 6 years ago
- Status changed from In Progress to Needs feedback
- Assignee changed from Ondřej Kopr to Vladimír Kotýnek
- % Done changed from 60 to 90
I added tests and update documentation.
doc: https://wiki.czechidm.com/9.2/documentation/generated_values
commit: https://github.com/bcvsolutions/CzechIdMng/commit/489267fdbd64b841f559505894cb97c68ac0ffdf (branch develop)
Please Vlada you are best for check the bugfix (Radek and Vitek hasn't time for my review :( ). I just add new configuration property for generators and remove or replace white spaces. You can test is via frontend. Thank you.
Updated by Vladimír Kotýnek about 6 years ago
- Assignee changed from Vladimír Kotýnek to Ondřej Kopr
Neither do I have time for review. Also I think I'm not capable to do product code review. Ondra, please find someone else.
Updated by Ondřej Kopr about 6 years ago
- Assignee changed from Ondřej Kopr to Vít Švanda
Vladimír Kotýnek wrote:
Neither do I have time for review. Also I think I'm not capable to do product code review. Ondra, please find someone else.
I thought you are the best, because you founded the bug and review is only about tested new frontend functionality. It was simple test war exists on jenkins.
So someone (Vitek probably) you must do review! Do it today or tomorrow, thank you.
Updated by Vít Švanda about 6 years ago
- Assignee changed from Vít Švanda to Ondřej Kopr
- % Done changed from 90 to 100
I did review and test. It works nice. I have only one comment: When is more spaces next to each other, then every single space is replaced for defined character. It is predicated behavior, but may be it is not correct in the all situations (may be yes, if depends ...).
Updated by Ondřej Kopr about 6 years ago
- Status changed from Needs feedback to Closed
Vít Švanda wrote:
I did review and test. It works nice. I have only one comment: When is more spaces next to each other, then every single space is replaced for defined character. It is predicated behavior, but may be it is not correct in the all situations (may be yes, if depends ...).
I know it best solution for me. I want review from some more guy who is more business interest, but Vlada hasn't time for this. So thank you for review, I close this ticket for now.