Bug 50379 - Teacher import marks all following as errors after incorrect line
Teacher import marks all following as errors after incorrect line
Status: RESOLVED WONTFIX
Product: UCS@school
Classification: Unclassified
Component: Import scripts
UCS@school 4.4
Other Linux
: P5 normal (vote)
: ---
Assigned To: UCS@school maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2019-10-17 09:42 CEST by Christina Scheinig
Modified: 2023-10-26 14:43 CEST (History)
3 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 4: Minor Usability: Impairs usability in secondary scenarios
Who will be affected by this bug?: 3: Will affect average number of installed domains
How will those affected feel about the bug?: 2: A Pain – users won’t like this once they notice it
User Pain: 0.137
Enterprise Customer affected?:
School Customer affected?: Yes
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2019101621001135
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christina Scheinig univentionstaff 2019-10-17 09:42:29 CEST
The customer noticed, when importing a teacher file an error occurs. What is important here: All following entries of the import file
are displayed as "ValidationError".

After re-sorting the import file and the erroneous entry is at the end, only an error is noted.

The "expected" behavior would actually be that the importer would handle the lines following the error "quite normally
Comment 2 Daniel Tröder univentionstaff 2019-10-17 11:26:38 CEST
We need the imported CSV file to analyse the problem.
Comment 3 Christina Scheinig univentionstaff 2019-10-17 17:14:50 CEST
(In reply to Daniel Tröder from comment #2)
> We need the imported CSV file to analyse the problem.

The customer attached the files in the ticket. Can you please get them from there.
Comment 4 Daniel Tröder univentionstaff 2019-10-18 09:05:29 CEST
OK - there is definitively something wrong.

The initial WrongObjectClass error happens, because the customer changed the users objectClass, but didn't remove it from an import restricted to the previous user role. So that error is correct.

But importing any user after that fails with (data anonymisied):
----------------------------------------------------------------
Entry #0: ValidationError when modifying ImportTeacher(name='...', school='...', dn='uid=...,cn=lehrer,cn=users,ou=...,dc=...,dc=...') (source_uid:... record_uid: ...): {} ValidationError({},)
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/ucsschool/importer/mass_import/user_import.py", line 186, in create_and_modify_users
    raise ValidationError(user.errors.copy())
----------------------------------------------------------------

The >>ValidationError({},)<< is strange.

This happened is the dry-run of a SiSoPi scenario.
Configuration and log are in the ticket.
Comment 5 Jan-Luca Kiok univentionstaff 2023-10-26 14:43:20 CEST
This issue has been filed against UCS@school 4.4.

UCS@school 4.4 is out of maintenance and components may have vastly changed in later releases. Thus, this issue is now being closed.

If this issue still occurs in newer versions, please use "Clone this bug" or reopen this issue. In this case please provide detailed information on how this issue is affecting you.