Bug 53843 - dynamic syntax choices for select syntaxes with dependency
dynamic syntax choices for select syntaxes with dependency
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UDM (Generic)
UCS 5.0
Other Linux
: P5 normal (vote)
: UCS 5.0-1-errata
Assigned To: Florian Best
Dirk Wiesenthal
https://git.knut.univention.de/univen...
:
Depends on: 38762 53840 54840
Blocks: 55887 54849
  Show dependency treegraph
 
Reported: 2021-09-27 13:26 CEST by Florian Best
Modified: 2023-03-17 10:17 CET (History)
1 user (show)

See Also:
What kind of report is it?: Development Internal
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):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Best univentionstaff 2021-09-27 13:26:53 CEST
We have several comboboxes (selection of choices) which depend on other fields.
The dependency mechanism currently only works for UDM_Objects/UDM_Attributes syntaxes.
We should implement it also for "select" syntaxes.

Examples are:
1. Bug #31857 - Drop-down list for objectclass and attributes
→ Only show LDAP attributes which are part of the selected objectclass in an extended attribute.

2. Bug #25054 - makes 'options' selectable from a list of options in extended attribute
→ only show UDM options belonging to the selected UDM module in an extended attribute
Comment 1 Florian Best univentionstaff 2022-04-21 21:29:38 CEST
A dependency mechanism for syntax choices has been added.
The syntax.get_choices(lo, options) may now receive dependencies in `options` like {syntax.depends: value_which_is_set_in_frontend}.
So when a dependency changes in the frontend another request to receive new choices is done (depending on syntax.javascript_dependency == False).
In case javascript_dependency == True the old javascript logic ('javascript:umc/modules/udm/callbacks:setDynamicValues') is applied.
For backwards compatibility when javascript_dependency == False the fallback logic does the same thing as the javascript would do.

The mechanism has been enabled for:
* the LDAP attributes depending on the selected objectClass in a extended attribute
* the UDM options depending on the selected UDM modules in a extended attribute

univention-management-console-module-udm.yaml
de1a3c8e14f2 | YAML Bug #53843

univention-management-console-module-udm (10.0.1-26)
ed10d2529816 | Bug #53843: debian/changelog

univention-management-console-module-udm (10.0.1-25)
7588b544a7c1 | Bug #53843: rename $name$ into $depends$
959160159293 | Bug #53843: add dependency mechanism for choices of "select" syntax classes.

univention-directory-manager-modules.yaml
de1a3c8e14f2 | YAML Bug #53843

univention-directory-manager-modules (15.0.11-44)
ed10d2529816 | Bug #53843: debian/changelog

univention-directory-manager-modules (15.0.11-43)
f96b9c5be8f6 | Bug #53843: add syntax.javascript_dependency = True to unify code
7588b544a7c1 | Bug #53843: rename $name$ into $depends$
959160159293 | Bug #53843: add dependency mechanism for choices of "select" syntax classes.
Comment 2 Dirk Wiesenthal univentionstaff 2022-06-08 13:00:55 CEST
YAML: OK
Code review: OK
Test for regressions: OK, none found