Bug 47841 - shorten textual import summary
shorten textual import summary
Product: UCS@school
Classification: Unclassified
Component: Import scripts
UCS@school 4.3
Other Linux
: P5 normal (vote)
: UCS@school 4.4 v9-errata
Assigned To: Toni Röhmeyer
Daniel Tröder
Depends on:
Blocks: 47840 53734
  Show dependency treegraph
Reported: 2018-09-20 11:27 CEST by Daniel Tröder
Modified: 2021-09-01 13:31 CEST (History)
2 users (show)

See Also:
What kind of report is it?: Feature Request
What type of bug is this?: 2: Improvement: Would be a product improvement
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
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:

before (114.45 KB, image/png)
2021-04-16 08:26 CEST, Daniel Tröder
after (49.84 KB, image/png)
2021-04-16 08:27 CEST, Daniel Tröder

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Tröder univentionstaff 2018-09-20 11:27:56 CEST
Customers may import 50.000 users each day, resulting in > 10.000 lines of textual summary.

The textual summary of an import job should not list created/modified/deleted users if they are more that 8 (2 lines) per role. The lines with numbers ("Created ImportStaff: 10" etc) and the complete error list (regardless of length) should remain.
Comment 1 Toni Röhmeyer univentionstaff 2020-04-09 15:00:52 CEST
4 Lines per role are now allowed.

Tested with:
/usr/share/ucs-school-import/scripts/ucs-school-testuser-import --staff 17 --students 16 --classes 1 DEMOSCHOOL

Read users from input data: 33
Created ImportStaff: 17
Modified ImportStaff: 0
Deleted ImportStaff: 17
Created ImportStudent: 16
  ['eyrin.holtma', 'nives.spieke', 'sissy.haseke', 'reichwein.la']
  ['kuni.schieda', 'germaine.fra', 'friedbert.ei', 'ghislaine.ti']
  ['jokim.kruel', 'damiana.grei', 'shika.boenit', 'tim.dallmann']
  ['veva.bender', 'fritjof.buss', 'ursulina.fla', 'aswina.drews']
Modified ImportStudent: 0
Deleted ImportStudent: 16
  ['yves.krautte', 'ossy.niehues', 'gundela.holt', 'irmo.beck']
  ['ioakim.nehri', 'hede.tormoeh', 'ernest.lueni', 'estrid.schmi']
  ['winibert.lue', 'sintbald.wro', 'camillus.lin', 'romika.farnb']
  ['vidette.grim', 'masetto.knor', 'ehrenreich.t', 'floria.nieho']
Errors: 0

Pushed solution on branch troehmey/47841 with commit

commit 8b42b035be8e32e8024e59d531856c4a1f2fefe9
Bug #47841: shortened import summary
Comment 2 Tobias Wenzel univentionstaff 2021-04-13 15:10:33 CEST

The code works/ looks as expected. 

The textual summary of an import job should not list created/modified/deleted users if they are more than 8 (2 lines) per role.
→ you have 4x4 cf. comment 1

Was this requirement changed?
Comment 3 Toni Röhmeyer univentionstaff 2021-04-15 18:12:31 CEST
I cannot tell the reason why I did the 4x4 output. It's been too long^^

However, I committed the solution to a new updated branch:
[troehmey/bug47841_v2] 2f7126b4b Bug #47841: shortened import summary

And as you can see now, the output is now as intended when testing the behavior with
/usr/share/ucs-school-import/scripts/ucs-school-testuser-import --staff 9 --students 8 --classes 1 DEMOSCHOOL

------ User import statistics ------
Read users from input data: 17
Created ImportStaff: 9
Modified ImportStaff: 0
Deleted ImportStaff: 9
Created ImportStudent: 8
  ['hjoerdis.kal', 'andrew.loth', 'luitgunde.st', 'jim.kuhn']
  ['xeno.stuetze', 'joeelle.oent', 'aretha.suren', 'volma.kemner']
Modified ImportStudent: 0
Deleted ImportStudent: 8
  ['carlota.boss', 'finetta.suer', 'otker.rittma', 'almar.fergla']
  ['lone.ghotb', 'siobhan.stro', 'luither.schl', 'gerdis.polat']
Errors: 0
------ End of user import statistics ------
Comment 4 Daniel Tröder univentionstaff 2021-04-16 08:26:46 CEST
Created attachment 10690 [details]
Comment 5 Daniel Tröder univentionstaff 2021-04-16 08:27:03 CEST
Created attachment 10691 [details]
Comment 6 Daniel Tröder univentionstaff 2021-04-16 08:27:30 CEST
OK: code review
OK: automatic test (only one tried: 201_import-users_basic.py)
OK: manual test (see screenshots "before" and "after")
Comment 7 Daniel Tröder univentionstaff 2021-04-16 08:30:41 CEST
Please merge into 4.4, build and add an advisory.
Comment 8 Toni Röhmeyer univentionstaff 2021-04-18 12:34:15 CEST
Fix merged to 4.4 with

b6c373892 Bug #47841: added yaml
3086cb9a8 Bug #47841: added changelog entry
f109577d2 Bug #47841: Merge branch 'troehmey/bug47841_v2' into 4.4

Successful build:

Package: ucs-school-import
Version: 17.0.53A~
Branch: ucs_4.4-0
Scope: ucs-school-4.4
Comment 9 Daniel Tröder univentionstaff 2021-04-22 10:29:28 CEST
OK: build and advisory
Comment 10 Tobias Wenzel univentionstaff 2021-04-22 11:21:56 CEST
Errata updates for UCS@school 4.4 v9 have been released.


If this error occurs again, please clone this bug.