Bug 42288 - ucs-school-import: do not modify group memberships if no group specified
ucs-school-import: do not modify group memberships if no group specified
Product: UCS@school
Classification: Unclassified
Component: Import scripts
UCS@school 4.1 R2
Other Linux
: P5 critical (vote)
: UCS@school 4.1 R2 vXXX
Assigned To: Daniel Tröder
Florian Best
: interim-1
Depends on: 41847
  Show dependency treegraph
Reported: 2016-09-06 14:49 CEST by Sönke Schwardt-Krummrich
Modified: 2016-10-04 13:24 CEST (History)
3 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 5: Major Usability: Impairs usability in key scenarios
Who will be affected by this bug?: 4: Will affect most installed domains
How will those affected feel about the bug?: 4: A User would return the product
User Pain: 0.457
Enterprise Customer affected?:
School Customer affected?: Yes
ISV affected?:
Waiting Support:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Note You need to log in before you can comment on or make changes to this bug.
Description Sönke Schwardt-Krummrich univentionstaff 2016-09-06 14:49:12 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).

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.
Comment 1 Daniel Tröder univentionstaff 2016-09-07 14:33:16 CEST
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).
Comment 2 Daniel Tröder univentionstaff 2016-09-08 17:39:11 CEST
r72451: added test for this in 90_ucsschool/34_import-users_via_cli_v2 -> test_create_no_modify_classes_with_empty_class_name()
Comment 3 Daniel Tröder univentionstaff 2016-09-15 18:10:22 CEST
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
Comment 4 Florian Best univentionstaff 2016-09-22 18:07:07 CEST
OK: import with classes defined
OK: import with no classes defined

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.
Comment 5 Sönke Schwardt-Krummrich univentionstaff 2016-10-04 13:24:46 CEST
UCS@school 4.1 R2 v5 has been released.


If this error occurs again, please clone this bug.