Univention Bugzilla – Bug 45524
(ucs-test) Cut username generation at first double-barrelled lastname
Last modified: 2021-05-25 10:13:34 CEST
We need a ucs-test script, that checks this new API. +++ This bug was initially created as a clone of Bug #42144 +++ According to Feedback on Ticket#2016082421000167 related to the Import-Interface. Use case from the customer: Import user with double-barrelled name (e.g. Nadine Mueller-Meier) Configuration: "username": {"default": "<:umlauts><firstname>[0]<lastname><:lower>[COUNTER2]"} Result: username = nmueller-mei3 The customer would like to have the possibility (e.g. via schema option) to cut the name at the hyphen and don't use the second lastname in the username generation. username = nmueller3 This requirement was requested and implemented in a project specific import tool for the customer 09711 as well. So, I guess it is not a customer specific requirement.
The new test 90_ucsschool/224_import-users_test_format_hook installs a FormatPyHook in /usr/share/ucs-school-import/pyhooks/ which modifies attributes used by format_from_scheme() to create the 'email' and 'birthday' attributes of the imported users. After the import it verifies the result. A few tests had the initialization wrong, which resulted in a lot of unnecessary OU creation. [4.2 786ba67a] Bug #45524: create 14 fewer OUs [4.2 347532d3] Bug #45524: add test for FormatPyHook ucs-test-ucsschool 4.0.4-36
OK: test script is working
Adapted test 90_ucsschool/224_import-users_test_format_hook to changes from Bug #45679.