Univention Bugzilla – Bug 42288
ucs-school-import: do not modify group memberships if no group specified
Last modified: 2016-10-04 13:24:46 CEST
Extracted from Bug #41847: If no class has been specified, the normal import AND the legacy import should leave the class memberships untouched during a M(odification) action. This should apply for teachers AND students AND staff AND SchoolAdmins (→ for all U@S-users). Explanation: Students have to be assigned to at least one class in CSV. If the class is set, modifications are performed. The assignment of teachers to classes is done via the UMC modules. Therefore if the teacher is modified via legacy import, no class membership is defined in CSV and the import should not alter the class memberships. Otherwise all changes done via UMC are lost. In UCS@school 4.1 the legacy import left the class memberships untouched if no class was specified → a regression in 4.1R2.
r72365: if school_classes is not set or empty, existing school_classes are not modifyed. Also added an explaining line to the import manual (and fixed missing line breaks in <programlisting> env -> white space only cleanup).
r72451: added test for this in 90_ucsschool/34_import-users_via_cli_v2 -> test_create_no_modify_classes_with_empty_class_name()
r72634: test was renamed to test_no_modify_classes_with_empty_class_column() and test cases added: 1. has 2 classes -> import w/o classes -> has 2 classes 2. has 2 classes -> import w 1 class -> has 1 class 3. has 0 classes -> import w/o classes -> has 0 classes 4. has 2 classes from 2 OUs -> import w/o classes -> has 2 classes from 2 OUs
OK: import with classes defined OK: import with no classes defined OK: YAML It is not possible to remove the user from all classes with this way. But that would then afterwards be possible with the UMC module.
UCS@school 4.1 R2 v5 has been released. http://docs.software-univention.de/changelog-ucsschool-4.1R2v5-de.html If this error occurs again, please clone this bug.