Bug 56041 - CLI import with more than one --set csv: arguments handle only last one
CLI import with more than one --set csv: arguments handle only last one
Product: UCS@school
Classification: Unclassified
Component: Import scripts
UCS@school 5.0
Other Linux
: P5 normal (vote)
: UCS@school 5.0 v3-errata
Assigned To: Carlos García-Mauriño
Johannes Königer
Depends on: 53632
  Show dependency treegraph
Reported: 2023-05-05 12:04 CEST by Carlos García-Mauriño
Modified: 2023-05-25 14:11 CEST (History)
6 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?: 1: Will affect a very few 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.034
Enterprise Customer affected?: Yes
School Customer affected?: Yes
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2021080421000284
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 Carlos García-Mauriño univentionstaff 2023-05-05 12:04:47 CEST
+++ This bug was initially created as a clone of Bug #53632 +++

If you set two --set csv arguments at a command line import only the last one will processed. It looks like output will be parsed as a string, so only the last specification will be stored and handled.

This is the same that happened in #53632 but with `csv` instead of output.

Replication steps:

"firstname", "lastname", "name", "record_uid", "school"
"test", "test", "test", "test", "test"

/usr/share/ucs-school-import/scripts/ucs-school-user-import -i source.csv --set source_uid=importer user_role=teacher csv:mapping:school=school csv:mapping:record_uid=record_uid csv:mapping:firstname=firstname csv:mapping:lastname=lastname csv:mapping:name=name -s test

 'csv': {'allowed_missing_columns': [],
         'header_lines': 1,
         'incell-delimiter': {'default': ','},
         'mapping': {'name': 'name'}},
Comment 2 Johannes Königer univentionstaff 2023-05-25 08:46:34 CEST
Has been fixed with:

Package: ucs-school-import
Version: 18.0.32
Commit d76523a8ee20541a9570ff88875e31440bae2670
Comment 3 Jürn Brodersen univentionstaff 2023-05-25 14:11:25 CEST
Errata updates for UCS@school 5.0 v3 have been released.


If this error occurs again, please clone this bug.