Univention Bugzilla – Bug 41847
ucs-school-import: crash with empty class name in CSV
Last modified: 2016-10-07 16:54:39 CEST
An empty class name (except for staff) in a CSV row leads to a bad class name "<school>-" which leads to UDM refusing to create the group → failed import.
Fixed in r71222 Advisory: r71223
Another problem with empty class names was fixed. A ucs-test was added. Test: 71232 Fix: 71233 Advisory: 71234
For QA: If no class has been specified, the legacy import should leave the class memberships untouched during a M(odification) action. This should apply for teachers AND students. 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 reply to Sönke Schwardt-Krummrich from comment #3) > 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. This is contrary to the concept of "import data represents target state". * This does probably not work now. * Are there other cases where import data does NOT represent the target state? * How to distinguish "no classes → ignore" from a situation where a teacher _should_ be removed from all classes, because it is managed in the dource database? (What is supported?)
Maybe: If the 'class' header line is present and empty in the CSV file the user should be removed from the classes. If it's not present the current classes should be kept.
Test for this bug is in 90_ucsschool/34_import-users_via_cli_v2 test_create_with_empty_class_name().
(In reply to Daniel Tröder from comment #6) > Test for this bug is in 90_ucsschool/34_import-users_via_cli_v2 > test_create_with_empty_class_name(). This only tests the new import. I also added 34_import-users-legacy that checks the legacy import without specified class for students, teachers, teacherAndStaff and staff. OK: code change OK: functional test - ucs-school-import - import-user OK: test script OK: advisory The UMC CSV module is still broken → bug #41987
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.
*** Bug 41834 has been marked as a duplicate of this bug. ***