Univention Bugzilla – Bug 41471
Support for multi-value attributes
Last modified: 2016-09-30 12:43:29 CEST
As far as I understand the source code, there is currently no support for multi-value fields in ucs@school-import-tool. For example, a user might have multiple e-mail addresses, a general one user@schools.example.org and multiple specific addresses like user@first-school.example.org. This should be supported by ucs@school-import-tool.
Support for multi-value fields can be added. All it needs is a delimiter... configurable... default is comma which is already used in mutli-value fields "schools" and "classes"... Adaptions will have to be done in ImportUser.prepare_udm_properties() and maybe in ImportUser.make_email(). I suggest to add the following configuration keys: "delimiter": { "default": str [2]: multi-value field separator symbol, default "phone": str [3]: multi-value field separator symbol, for column 'phone' ... }
Implemented in r69960. Input mapping to a UDM attribute whos property_descriptions say it's a multivalue, is now split into a list by character in the configuration "csv/incell-delimiter". The value can vary for each attribute as described above. "schule1,gsmitte","Anton","Meyer","1A","anton1@nstx.local","Dies ist ein Schüler","123-456,789-012" dn: uid=A.14Meyer,cn=schueler,cn=users,ou=gsmitte,dc=uni,dc=dtr ucsschoolRecordUID: Anton-Meyer-anton1@nstx.local ucsschoolSchool: gsmitte ucsschoolSchool: schule1 ucsschoolSourceUID: LegacyDB description:: RGllcyBpc3QgZWluIFNjaMO8bGVy telephoneNumber: 123-456 telephoneNumber: 789-012 Not directly related: A configuration option for the CSV-column-delimiter was added: "csv/delimiter".
34_import-users_via_cli_v2 now tests with csv:incell-delimiter:default=';' and mailAlternativeAddress. ucs-test-ucsschool (3.0.12-5): r70237 | Bug #41471: added test for multi value fields in 34_import-users_via_cli_v2 → Verified
UCS@school 4.1 R2 has been released: http://docs.software-univention.de/release-notes-ucsschool-4.1R2v1-de.pdf If this error occurs again, please use "Clone This Bug".