Bug 45252

Summary: S4C: Fixup `con_other_attribute` sync (e.g. telephoneNumber)
Product: UCS Reporter: Lukas Oyen <oyen>
Component: S4 ConnectorAssignee: Lukas Oyen <oyen>
Status: NEW --- QA Contact: Samba maintainers <samba-maintainers>
Severity: normal    
Priority: P5 CC: best, gohmann, requate
Version: UCS 5.0Flags: oyen: Patch_Available+
Target Milestone: ---   
Hardware: Other   
OS: Linux   
See Also: https://forge.univention.org/bugzilla/show_bug.cgi?id=36480
https://forge.univention.org/bugzilla/show_bug.cgi?id=47209
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?: 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.069 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:
Bug Depends on: 45249    
Bug Blocks:    
Attachments: 35903-s4c-test-telephone-421.patch
45252-s4c-test-telephone-422.patch

Description Lukas Oyen univentionstaff 2017-08-23 14:46:29 CEST
Created attachment 9140 [details]
35903-s4c-test-telephone-421.patch

The attached patch fixes the `con_other_attribute` sync in the S4 Connector. This the same as in bug #36480 comment 5. See the new test-case `52_s4connector/502_other_attribute_sync.py` or the following comment from univention-s4-connector/modules/univention/s4connector/s4/__init__.py for details:

> # This is the case, where we map from a multi-valued UCS attribute to two S4 attributes.
> # telephoneNumber/otherTelephone (S4) to telephoneNumber (UCS) would be an example.
> #
> # In Active Directory, for attributes that are split in two the administrator is
> # responsible for keeping a value in `telephoneNumber`. Imagine the following:
> # (a) telephoneNumber = '123', otherTelephone = ['123', '456']
> # In this case, if the administrator deletes the value of `telephoneNumber`,
> # Active Directory does NOT automatically pull a new value from `otherTelephone`.
> #
> # This is impossible to support with the connector. Imagine again case (a). If
> # we delete `123` from `phone` via UDM, AD would be synced into the following
> # state: (b) telephoneNumber = '', otherTelephone = ['456']
> # From now on, whenever we add a new value to `phone` via UDM, for example:
> # (c) phone = ['456', '789'] it MUST be synced as
> # (d) telephoneNumber = '', otherTelephone = ['456', '789'] as '456' came
> # before '789' and '456' is definitely in `otherTelephone`.
> #
> # We therefore implement, that `telephoneNumber` is never empty, as long as there
> # are values in `otherTelephone`. If a modification would delete the value of
> # `telephoneNumber` and at least one value exists in `otherTelephone`, the
> # connector duplicates the first entry of `otherTelephone` into
> # `telephoneNumber`.
Comment 1 Lukas Oyen univentionstaff 2017-08-23 14:48:00 CEST
*** Bug 35903 has been marked as a duplicate of this bug. ***
Comment 2 Lukas Oyen univentionstaff 2017-09-05 15:35:13 CEST
Created attachment 9176 [details]
45252-s4c-test-telephone-422.patch

Committed the test case (skipped) as r82686/r82687.

Revert r82687 if this is fixed.
Comment 3 Lukas Oyen univentionstaff 2017-09-11 16:13:45 CEST
Code rebased on 4.2-2 in branch loyen/45252-s4c-con-other-sync-422.