Bug 50203 - App Settings: outside settings do not use the InitialValue
App Settings: outside settings do not use the InitialValue
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: App Center
UCS 4.4
Other Linux
: P5 normal (vote)
: UCS 4.4-2-errata
Assigned To: Dirk Wiesenthal
Johannes Keiser
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2019-09-17 16:39 CEST by Dirk Wiesenthal
Modified: 2019-10-09 14:21 CEST (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?: Yes
Waiting Support:
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 Dirk Wiesenthal univentionstaff 2019-09-17 16:39:50 CEST
This Setting

[myapp/my-setting]
Type = List
Description = Some Setting
Show = Install, Settings
Values = x, y, z
InitialValue = z
Scope = outside

should $(ucr set myapp/my-setting=z)

if univention-app install myapp is used. But it does not. Instead, the installation aborts, because "None is not a valid option".

The InitialValue of the setting is simply ignored if not given explicitly (install --set myapp/my-setting=z).

This is a problem in our App Tests as the installation is done without further params and a required outside Setting will lead to an error.
Comment 1 Dirk Wiesenthal univentionstaff 2019-09-17 16:47:29 CEST
See daa447a434..98b193538e in dwiesent/bug50203

The Settings API looks flawed. We should somehow add self.app = app in Settings.__init__()

Strictly speaking, it is an API change either way. (But nobody relies on it)
Comment 2 Dirk Wiesenthal univentionstaff 2019-10-07 02:48:04 CEST
Fixed in
  univention-appcenter 8.0.11-70A~4.4.0.201909301007

according to patch.

get_initial_value now takes "app" as argument. (to test for self.is_outside(app))

Zammad tests run now (until other tests fail)
Comment 3 Johannes Keiser univentionstaff 2019-10-07 10:25:43 CEST
OK: initialvalue is used for scope outside
OK: yaml
-> verified
Comment 4 Erik Damrose univentionstaff 2019-10-09 14:21:18 CEST
<http://errata.software-univention.de/ucs/4.4/299.html>