Bug 46754 - [4.2] ucs-school-import: dependency solver for formatting ImportUser properties
[4.2] ucs-school-import: dependency solver for formatting ImportUser properties
Status: CLOSED FIXED
Product: UCS@school
Classification: Unclassified
Component: Import scripts
UCS@school 4.2
Other Linux
: P5 normal (vote)
: UCS@school 4.2 v9
Assigned To: Daniel Tröder
Jürn Brodersen
:
: 46707 (view as bug list)
Depends on: 42137
Blocks: 46923
  Show dependency treegraph
 
Reported: 2018-03-28 15:27 CEST by Daniel Tröder
Modified: 2018-06-04 15:34 CEST (History)
5 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?: 2: Will only affect a 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.114
Enterprise Customer affected?:
School Customer affected?: Yes
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 Daniel Tröder univentionstaff 2018-03-28 15:27:27 CEST
Merge changes to UCS@school 4.3 back into 4.2.

+++ This bug was initially created as a clone of Bug #42137 +++

This bug was originally created because currently recordUID and sourceUID are created before any other ImportUser attribute. This prevents the usage of other attributes that must be calculated (are not in the CSV input) in them (for example "<username>"), if not given in the CSV.

That is actually a more generell problem: all properties can be created from other properties - including those also being generated. But the order of property creation/formatting is currently fixed, effectively allowing formatting only from data given in the CSV input.

The attached completely untested(!) patch implements a recursive dependency solver for all properties.
Comment 1 Daniel Tröder univentionstaff 2018-03-28 15:49:03 CEST
Code changes from Bug #42137 merged.

[4.2] 25059622 Bug #46754: add recursive dependency solver for formatting ImportUser properties
[4.2] f7cee8ed Bug #46754: tests for format dependency solver
[4.2] 797215f1 Bug #46754: tests for format dependency solver
[4.2] fc9c9f94 Bug #46754: changelog
[4.2] 52df74ed Bug #46754: advisory

ucs-school-import (15.0.3-29)
ucs-test-ucsschool (4.0.4-78)
Comment 2 Daniel Tröder univentionstaff 2018-03-28 16:00:49 CEST
*** Bug 46707 has been marked as a duplicate of this bug. ***
Comment 3 Daniel Tröder univentionstaff 2018-04-06 15:49:24 CEST
[4.2] fac7ed74 Bug #46754: raise exception instead of log warning
[4.2] d610dfec Bug #46754: test no user is created or deleted in case of dependency recursion
[4.2] ba5cc8af Bug #46754: changelog

ucs-school-import (15.0.3-31)
ucs-test-ucsschool (4.0.4-81)
Comment 4 Jürn Brodersen univentionstaff 2018-04-10 14:38:39 CEST
Same as bug 42137 comment 4
Comment 5 Daniel Tröder univentionstaff 2018-04-11 13:11:14 CEST
[4.2] 04e2e66c Bug #46754: handle dependency resolution for UDM properties
[4.2] a35bbf59 Bug #46754: test formatting dependencies with and without UDM properties
[4.2] ee34cd81 Bug #46754: changelog
[4.2] d6422e4a Bug #46754: advisory update

ucs-school-import (15.0.3-33)
ucs-test-ucsschool (4.0.4-82)
Comment 6 Daniel Tröder univentionstaff 2018-04-11 19:26:41 CEST
[4.2] 9f45d9ed Bug #46754: query UDM for LDAP mapping without using LDAP and don't cache result
[4.2] f9352afa Bug #46754: changelog
[4.2] 37c08e3c Bug #46754: advisory update
Comment 7 Sönke Schwardt-Krummrich univentionstaff 2018-04-17 11:25:45 CEST
see Bug 42137
Comment 8 Daniel Tröder univentionstaff 2018-04-18 11:45:59 CEST
The attributes school, record_uid, source_uid are extended attributes and are resolved.

Anyway - I added a fresh extended attributes that is not already mapped by the ucsschool.lib.

[4.2] e59b7e98 Bug #46754: create, format and depend on not-ucsschool-lib-mapped extended attribute
[4.2] bb087793 Bug #46754: changelog

ucs-test-ucsschool (4.0.4-85)
Comment 9 Jürn Brodersen univentionstaff 2018-04-23 14:38:52 CEST
Tests look good -> OK
jenkins -> OK
YAML -> OK
Import works -> OK

-> Verified
Comment 10 Sönke Schwardt-Krummrich univentionstaff 2018-05-02 17:53:00 CEST
UCS@school 4.2 v9 has been released.

https://docs.software-univention.de/changelog-ucsschool-4.2v9-de.html

If this error occurs again, please clone this bug.