Bug 41707 - Import tool is unable to use extended attributes
Import tool is unable to use extended attributes
Status: CLOSED FIXED
Product: UCS@school
Classification: Unclassified
Component: Import scripts
UCS@school 4.1 R2
Other Linux
: P5 normal (vote)
: UCS@school 4.1 R2 vXXX
Assigned To: Sönke Schwardt-Krummrich
Daniel Tröder
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2016-06-29 18:01 CEST by Sönke Schwardt-Krummrich
Modified: 2016-10-06 21:15 CEST (History)
3 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 3: Simply Wrong: The implementation doesn't match the docu
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.154
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
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 Sönke Schwardt-Krummrich univentionstaff 2016-06-29 18:01:17 CEST
2016-06-03 23:12:22 ERROR user_import.read_input:90  Error reading 1. user: Unknown UDM property: 'nwnsw9c70c'.
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/ucsschool/importer/mass_import/user_import.py", line 84, in read_input
    import_user = self.reader.next()
  File "/usr/lib/pymodules/python2.7/ucsschool/importer/reader/base_reader.py", line 75, in next
    cur_import_user = self.map(input_dict, cur_user_roles)
  File "/usr/lib/pymodules/python2.7/ucsschool/importer/reader/csv_reader.py", line 186, in map
    import_user=import_user)
UnknownProperty: Unknown UDM property: 'nwnsw9c70c'.


"nwnsw9c70c" is an extended attribute.
Comment 1 Sönke Schwardt-Krummrich univentionstaff 2016-06-29 18:53:02 CEST
In ucs-school-import/modules/ucsschool/importer/reader/csv_reader.py the users/user module has not been initialized, so extended attributes were not available in module's property_descriptions.

Fixed ucs-school-import, added test in 90_ucsschool/34_import-users_via_cli_v2

ucs-school-import.yaml:
r70724 | Bug #41707: added support for extended attributes in csv_reader

ucs-test-ucsschool (3.0.12-15):
r70726 | Bug #41707: added changelog entry
r70725 | Bug #41707: add test for extended attributes

ucs-school-import (14.0.15-1):
r70724 | Bug #41707: added support for extended attributes in csv_reader
Comment 2 Daniel Tröder univentionstaff 2016-07-01 15:00:51 CEST
OK: code change
OK: advisory (build fixed in r70769)
OK: automatic test
Comment 3 Sönke Schwardt-Krummrich univentionstaff 2016-07-04 12:06:31 CEST
UCS@school 4.1 R2 v2 has been released.

If this error occurs again, please clone this bug.
Comment 4 Daniel Tröder univentionstaff 2016-09-08 11:31:27 CEST
Test for this bug is in 90_ucsschool/34_import-users_via_cli_v2
test_create_modify_with_extended_attribute().