Bug 1936620

Summary: OLM checkbox descriptor renders switch instead of checkbox
Product: OpenShift Container Platform Reporter: Jon Jackson <jonjacks>
Component: Management ConsoleAssignee: Jon Jackson <jonjacks>
Status: CLOSED ERRATA QA Contact: Yanping Zhang <yanpzhan>
Severity: low Docs Contact:
Priority: unspecified    
Version: 4.8CC: aos-bugs, jokerman, rdave, spadgett, yapei
Target Milestone: ---   
Target Release: 4.8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: The DynamicForm component was overriding the default boolean field with a boolean switch. Consequence: Even when applying the checkbox descriptor, the boolean switch was rendered. Fix: Use the standard checkbox as the default boolean field, and only use the boolean switch when a boolean switch descriptor is applied. Result: Checkbox is always rendered for boolean fields unless otherwise specified by descriptor.
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-07-27 22:51:42 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jon Jackson 2021-03-08 20:15:32 UTC
Description of problem:
urn:alm:descriptor:com.tectonic.ui:checkbox does not work as expected. A boolean switch widget is rendered instead of a checkbox.

Version-Release number of selected component (if applicable):
4.6

How reproducible:
Always

Steps to Reproduce:
1. Create csv and crd from yaml files in this gist: https://gist.github.com/TheRealJon/3680c8a573bde88a974588e269230562
2. Visit Installed Operators > Mock Operator
3. Click "Create instance" under Mocke Resource card


Actual results:
Checkbox field on the resulting form is actually a switch

Expected results:
Checkbox field should be a standard checkbox


Additional info:

Comment 2 Yanping Zhang 2021-04-08 02:07:15 UTC
Tested on ocp 4.8 cluster with payload 4.8.0-0.nightly-2021-04-07-115443.
Steps to verify:
1. Create crd/csv from yaml files in this gist: https://gist.github.com/TheRealJon/3680c8a573bde88a974588e269230562
2. Visit Installed Operators > Mock Operator
3. Click "Create instance" under Mocke Resource card, check the "Checkbox" field, now it's a standard checkbox, not a switch boolean.
The bug is fixed.

Comment 8 errata-xmlrpc 2021-07-27 22:51:42 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: OpenShift Container Platform 4.8.2 bug fix and security update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2021:2438