Bug 32845

Summary: Not defined checkbox (policy view) is displayd as ticked
Product: UCS Reporter: Janis Meybohm <meybohm>
Component: UMC - Domain management (Generic)Assignee: Dirk Wiesenthal <wiesenthal>
Status: CLOSED FIXED QA Contact: Florian Best <best>
Severity: normal    
Priority: P5 CC: gohmann, jmm, klaeser, wiesenthal
Version: UCS 3.1   
Target Milestone: UCS 3.2-0-errata   
Hardware: Other   
OS: Linux   
What kind of report is it?: --- 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): Usability
Max CVSS v3 score:

Description Janis Meybohm univentionstaff 2013-10-11 12:44:57 CEST
Easily reproducible with the default password policy in which "Password quality check" is not defined but displayed as ticked (with the "(not defined)" phrase appended) when viewed via the "[Policies]" tab on a user object.
Comment 1 Alexander Kläser univentionstaff 2013-11-07 14:28:10 CET
*** Bug 33191 has been marked as a duplicate of this bug. ***
Comment 2 Dirk Wiesenthal univentionstaff 2013-12-04 22:57:30 CET
Bug was:

if (!iinfo instanceof Array) {
  iwidget.set('value', '');
}

-> never true, because "!" beats "instanceof":
  !undefined instanceof Array -> true instanceof Array -> false.


} else {
  iwidget.set('value', []);
}

-> [] is evaluated as true for the CheckBox.

Did not fix the check, instead removed it completely and also the "else" part. Always set to ''. Because all of this is only evaluated
  if (!iinfo) { ... }
so the whole check was not only buggy, it was useless even if correct.

Fixed in
  univention-management-console-module-udm 4.0.97-10.426.201312042251

YAML added
Comment 3 Florian Best univentionstaff 2013-12-06 11:49:23 CET
OK, checkbox is not selected anymore.

YAML OK
Comment 4 Moritz Muehlenhoff univentionstaff 2013-12-12 11:32:50 CET
http://errata.univention.de/ucs/3.2/14.html