Bug 50203

Summary: App Settings: outside settings do not use the InitialValue
Product: UCS Reporter: Dirk Wiesenthal <wiesenthal>
Component: App CenterAssignee: Dirk Wiesenthal <wiesenthal>
Status: CLOSED FIXED QA Contact: Johannes Keiser <keiser>
Severity: normal    
Priority: P5 CC: gulden
Version: UCS 4.4   
Target Milestone: UCS 4.4-2-errata   
Hardware: Other   
OS: Linux   
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: Flags outvoted (downgraded) after PO Review:
Ticket number: Bug group (optional):
Max CVSS v3 score:

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>