Univention Bugzilla – Bug 41645
Combination of <:lower> and [COUNTER2] not possible
Last modified: 2016-10-06 21:12:50 CEST
For the import, I tried to generate lowercase user names with a counter in case the name is already in use. My username configuration looks as follows (the whole configuration can be found at Bug #41642): "username": "<:lower><:umlauts><firstname>.<lastname>[0:2][COUNTER2]" This results in the following error message. It is therefore not possible to generate lowercase usernames with a counter which I find to be a major issue: 2016-06-15 16:43:44 DEBUG base.get_only_udm_obj:853 Getting ImportStudent UDM object by filter: (&(objectClass=ucsschoolType)(ucsschoolSourceUID=mydb)(ucsschoolRecordUID= 2001-11-03)) 2016-06-15 16:43:44 ERROR user_import.create_and_modify_users:190 Entry #0: Unknown variable name '[counter2]' in username scheme 'elena.sc[counter2]': '[counter2]' Traceback (most recent call last): File "/usr/lib/pymodules/python2.7/ucsschool/importer/mass_import/user_import.py", line 113, in create_and_modify_users user = self.determine_add_modify_action(imported_user) File "/usr/lib/pymodules/python2.7/ucsschool/importer/mass_import/user_import.py", line 224, in determine_add_modify_action imported_user.prepare_all(new_user=True) File "/usr/lib/pymodules/python2.7/ucsschool/importer/models/import_user.py", line 177, in prepare_all self.prepare_attributes(new_user) File "/usr/lib/pymodules/python2.7/ucsschool/importer/models/import_user.py", line 190, in prepare_attributes self.make_username() File "/usr/lib/pymodules/python2.7/ucsschool/importer/models/import_user.py", line 434, in make_username self.name = self.username_handler.format_username(self.name) File "/usr/lib/pymodules/python2.7/ucsschool/importer/utils/username_handler.py", line 91, in format_username variable, name) FormatError: Unknown variable name '[counter2]' in username scheme 'elena.sc[counter2]': '[counter2]' 2016-06-15 16:43:44 WARNING utils.stopped_notifier:190 Starting univention-directory-notifier 2016-06-15 16:43:44 WARNING utils.stopped_notifier:192 Notifier was not running! Skipping 2016-06-15 16:43:44 ERROR cmdline.main:119 More than 0 errors. Exiting. Errors: 2016-06-15 16:43:44 ERROR cmdline.main:121 0: Unknown variable name '[counter2]' in username scheme 'elena.sc[counter2]': '[counter2]'
Fixed in r70562. Advisory in r70563.
ucs-test-ucsschool (3.0.13-2): r70722 | Bug #41645: test lowercase username with ALWAYS2 counter OK: YAML OK: functional test (via ucs-test) OK: code change
UCS@school 4.1 R2 v2 has been released. If this error occurs again, please clone this bug.