Univention Bugzilla – Bug 42903
extended attribute "mailhomeserver" sets wrong value if there is more than one mailserver present
Last modified: 2017-02-22 12:32:59 CET
Testingenvironment: 10.200.6.100 (mailserver_master) 10.200.6.101 (mailserver_backup) - create extended attribute "mailhomeserver" - create template - check extended attribute "mailhomeserver" - drop down menu with the master a first place and backup at second place - set second place (backup) - save - create new user and use template - check "mailhomeserver" at the created user - it is drop down menu with the master a first place and backup at second place - the value shows the first place (master)
extended attribute via udm: root@ucs:~# udm settings/extended_attribute create --position "cn=custom attributes,cn=univention,$(ucr get ldap/base)" \ --set objectClass=univentionMailRouting \ --set module=settings/usertemplate \ --set translationTabName='"de_DE" "Mail"' \ --set shortDescription="Mail Home Server" \ --set groupName="Advanced settings" \ --set CLIName=UniventionDovecotUserHomeServer \ --set translationGroupName='"de_DE" "Erweiterte Einstellungen"' \ --set translationShortDescription='"de_DE" "Mail Home Server"' \ --set tabName="Mail" \ --set syntax=MailHomeServer \ --set tabAdvanced=1 \ --set name="UniventionDovecotUserHomeServer" \ --set mayChange=1 \ --set ldapMapping="univentionMailHomeServer"
happened again at 2017011921000311
The code for Bug #33329, which was supposed to set the first value if the widgets first entry is empty, didn't check if the value is already set and overwrote it always with the very first truish value. univention-management-console-module-udm (6.0.11-39): r76890 | Bug #42903: fix setting of mailHomeServer via template univention-management-console-module-udm.yaml: r76891 | YAML Bug #42903 UCS 4.2 univention-management-console-module-udm (7.0.5-1): r76892 | Bug #42903: fix setting of mailHomeServer via template
It doesn't work in my tests: 10.201.41.1 Add a user with the template v-slave414 Afterwards, the user has the mailHomServer slave413 instead of slave414
Hm, I moved the logic/workaround for the nonempty default value into the backend to prevent these race condition: The value was set first to the random value, then set to the value from the template and then again back to the random value. univention-management-console-module-udm (6.0.11-40): r76902 | Bug #42903: move nonempty_is_default logic into backend to prevent race conditions in the Javascript frontend The extended attribute definition is wrong! It sets UniventionDovecotUserHomeServer instead of mailHomeServer as CLI name but only for settings/usertemplate and not for users/user. It must be set either for both or for none. Merge to UCS 4.2: univention-management-console-module-udm (7.0.5-1): r76904 | Bug #42903: move nonempty_is_default logic into backend to prevent race conditions in the Javascript frontend
Tests: OK Code review: OK UCS 4.2 merge: OK YAML: OK (In reply to Florian Best from comment #5) > The extended attribute definition is wrong! > It sets UniventionDovecotUserHomeServer instead of mailHomeServer as CLI > name but only for settings/usertemplate and not for users/user. > It must be set either for both or for none. Sorry, my fault, the attribute name is wrong but it is right that it is only registered for settings/usertemplate. The correct extended attribute should be: udm settings/extended_attribute create --position "cn=custom attributes,cn=univention,$(ucr get ldap/base)" \ --set objectClass=univentionMailRouting \ --set module=settings/usertemplate \ --set translationTabName='"de_DE" "Mail"' \ --set shortDescription="Mail Home Server" \ --set groupName="Advanced settings" \ --set CLIName=mailHomeServer \ --set translationGroupName='"de_DE" "Erweiterte Einstellungen"' \ --set translationShortDescription='"de_DE" "Mail Home Server"' \ --set tabName="Mail" \ --set syntax=MailHomeServer \ --set tabAdvanced=1 \ --set name="mailHomeServer" \ --set mayChange=1 \ --set ldapMapping="univentionMailHomeServer"
<http://errata.software-univention.de/ucs/4.1/402.html>