Bug 41834 - CSV-Import errors when selecting student after staff was selected
CSV-Import errors when selecting student after staff was selected
Status: CLOSED WORKSFORME
Product: UCS@school
Classification: Unclassified
Component: UMC - CSV Import
UCS@school 4.1 R2
Other Linux
: P5 normal (vote)
: UCS@school 4.1 R2 vXXX
Assigned To: Sönke Schwardt-Krummrich
Florian Best
: interim-2
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2016-07-21 15:30 CEST by Florian Best
Modified: 2023-03-25 06:52 CET (History)
2 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?: 3: Will affect average number of installed domains
How will those affected feel about the bug?: 3: A User would likely not purchase the product
User Pain: 0.257
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
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 Florian Best univentionstaff 2016-07-21 15:30:57 CEST
When I select Staff in the CSV-Import module (+upload a file, +go to the edit screen), go back and change the user type to student and follow the next steps it is not possible to see & modify the school classes of the user anymore.

If I continue to import users then I get for every user this traceback:

21.07.16 15:28:19.453  MODULE      ( WARN    ) : Something went wrong. Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/schoolcsvimport/util.py", line 234, in commit
    self.create(lo, validate=False)
  File "/usr/lib/pymodules/python2.7/ucsschool/lib/models/base.py", line 417, in create
    success = self.create_without_hooks(lo, validate)
  File "/usr/lib/pymodules/python2.7/ucsschool/lib/models/base.py", line 443, in create_without_hooks
    self.do_create(udm_obj, lo)
  File "/usr/lib/pymodules/python2.7/ucsschool/lib/models/user.py", line 229, in do_create
    udm_obj['groups'] = self.groups_used(lo)
  File "/usr/lib/pymodules/python2.7/ucsschool/lib/models/user.py", line 451, in groups_used
    self.get_or_create_group_udm_object(group_dn, lo)
  File "/usr/lib/pymodules/python2.7/ucsschool/lib/models/user.py", line 465, in get_or_create_group_udm_object
    group.create(lo)
  File "/usr/lib/pymodules/python2.7/ucsschool/lib/models/base.py", line 417, in create
    success = self.create_without_hooks(lo, validate)
  File "/usr/lib/pymodules/python2.7/ucsschool/lib/models/group.py", line 200, in create_without_hooks
    success = super(SchoolClass, self).create_without_hooks(lo, validate)
  File "/usr/lib/pymodules/python2.7/ucsschool/lib/models/base.py", line 430, in create_without_hooks
    raise ValidationError(self.errors.copy())
ValidationError: {'name': ['Value may not contain other than numbers, letters and dots!']}

The progressbar says that everything is fine and the users got created. The final overview afterwards says:

selin.sieck could not be created. {'name': ['Value may not contain other than numbers, letters and dots!']}
olive.amsin could not be created. {'name': ['Value may not contain other than numbers, letters and dots!']}
…
Comment 1 Florian Best univentionstaff 2016-07-21 15:32:00 CEST
Creating SchoolClass(name='AlteSchule-', school='AlteSchule', dn='cn=AlteSchule-,cn=klassen,cn=schueler,cn=groups,ou=AlteSchule,dc=school,dc=local')
Comment 2 Sönke Schwardt-Krummrich univentionstaff 2016-10-07 16:54:39 CEST

*** This bug has been marked as a duplicate of bug 41847 ***
Comment 3 Florian Best univentionstaff 2016-10-24 17:45:47 CEST
This is not fixed by Bug #41847 and still reproducible.
Comment 4 Sönke Schwardt-Krummrich univentionstaff 2016-11-03 11:58:28 CET
I'm still unable to reproduce this traceback. I used the following CSV file with only one line:

maxi.mustermit,Maxi,Mustermit,VierDrei

And I selected the following types for the columns:
username, first name, last name, class

I tested against current public appcenter version and with UCS@school build scope. No difference. No traceback.
Comment 5 Florian Best univentionstaff 2016-11-03 14:24:56 CET
OK