Bug 58502 - Migrate twisted boolean flags in UDM attributes
Summary: Migrate twisted boolean flags in UDM attributes
Status: NEW
Alias: None
Product: UCS
Classification: Unclassified
Component: UDM (Generic)
Version: UCS 5.2
Hardware: Other Linux
: P5 normal
Target Milestone: ---
Assignee: UMC maintainers
QA Contact: UMC maintainers
URL:
Keywords:
Depends on: 56172
Blocks:
  Show dependency treegraph
 
Reported: 2025-08-05 14:01 CEST by Oliver Friedrich
Modified: 2025-08-07 12:14 CEST (History)
2 users (show)

See Also:
What kind of report is it?: Feature Request
What type of bug is this?: ---
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): API change
Customer ID:
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Friedrich univentionstaff 2025-08-05 14:01:00 CEST
During the development of customer-specific extensions for UCS, we came across some UDM properties, whose logic is twisted from our pov:


>property_descriptions.dontsearch: bool
>    If set to False, the property is not searchable.

From:
https://docs.software-univention.de/developer-reference/5.2/en/udm/udm-modules.html#udm_modules_globals.property_descriptions.dontsearch

This should have been named "search" or the logic should be reversed.

and:

> copyable (optional)
>   Copy the value of the property when the entry is cloned.

From:
https://docs.software-univention.de/developer-reference/5.2/en/udm/package-extended-attributes.html#package-extended-attributes

Although it's not written there explicitly, we know that this also has a reversed logic: If copyable is set to true, then this means that the extended attribute can NOT be copied!

All in all, this is very confusing and should be changed to the expected behaviour. I know that this might break some of our integrations, that's why I have the following proposal:

Add a linked attribute, such that it is dependent of the "wrong" attribute, but make this "right".

For example: add an attribute to UDM modules, which is called search and copies the logic from dontsearch. If dontsearch is set to False, then search should be set to False, too. So it is a kind of "translation". Both values are "linked", which means you can, for a period of time, use both values at the same place, so that you don't break existing implementations. If one attribute is changed, the link one changes to the same value, too and vice versa.
In the future, dontsearch can be removed while search is kept, with the same values.

The same should be applied to copyable (e.g. name it non-copyable to keep the logic) and maybe more attributes I'm not aware of...
Comment 1 Florian Best univentionstaff 2025-08-07 12:14:29 CEST
See Bug #56172 for the copyable extended attr.

The proposal should be adjusted to: "search" → "searchable".