Bug 53632 - CLI import with more than one --set output: arguments handle only last one
CLI import with more than one --set output: arguments handle only last one
Status: CLOSED FIXED
Product: UCS@school
Classification: Unclassified
Component: Import scripts
UCS@school 4.4
Other Linux
: P5 normal (vote)
: UCS@school 5.0 v3-errata
Assigned To: Alexander Steffen
J Leadbetter
https://git.knut.univention.de/univen...
:
Depends on:
Blocks: 56041
  Show dependency treegraph
 
Reported: 2021-08-06 07:36 CEST by Dirk Schnick
Modified: 2023-05-05 12:04 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?: 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:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Schnick univentionstaff 2021-08-06 07:36:56 CEST
If you set two --set output arguments at a command line import only the last output argument will processed. It looks like output will be parsed as a string, so only the last specification will be stored and handled.

Command:
/usr/share/ucs-school-import/scripts/ucs-school-user-import -c /var/lib/ucs-school-import/configs/test_student.json -i source.csv --set logfile=/data/01/tmp/test/import/2021/08/logfile.log output:user_import_summary="/data/01/tmp/test/import/2021/08/summary.csv" output:new_user_passwords="/data/01/tmp/test/import/2021/08/passwd.csv" school=test source_uid=test-student dry_run=true

Logfile:
2021-08-05 14:41:51 INFO  cmdline.prepare_import:214  Using command line arguments: {'school': 'test', 'source_uid': 'test-student', 'dry_run': True, 'output': {'new_user_passwords': '/data/01/tmp/test/import/2021/08/passwd.csv'}, 'input': {'filename': 'source.csv'}, 'logfile': '/data/01/tmp/test/import/2021/08/logfile.log'}

Complete Logfile and configfile is attached in ticket.
Comment 2 Carlos García-Mauriño univentionstaff 2023-03-13 15:20:33 CET
Fixed in:

```
Package: ucs-school-import
Version: 18.0.30A~5.0.0.202303091544
Branch: ucs_5.0-0
Scope: ucs-school-5.0


Package: ucs-test-ucsschool
Version: 7.3.116A~5.0.0.202303131458
Branch: ucs_5.0-0
Scope: ucs-school-5.0
```

Not released yet.
Comment 3 Carlos García-Mauriño univentionstaff 2023-03-27 10:29:54 CEST
Errata updates for UCS@school 5.0 v3 have been released.

https://docs.software-univention.de/ucsschool-changelog/5.0v3/de/changelog.html

If this error occurs again, please clone this bug.