Bug 1826074 - specDescriptors fieldDependency not working as expected
Summary: specDescriptors fieldDependency not working as expected
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 4.4
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 4.5.0
Assignee: Yu Zhao
QA Contact: Yadan Pei
URL:
Whiteboard:
Depends On:
Blocks: 1827457 1835775
TreeView+ depends on / blocked
 
Reported: 2020-04-20 19:49 UTC by tony.wu
Modified: 2020-07-13 17:29 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
What was broke: The “fieldDependency” specDescriptor doesn’t work properly, control field cannot control the visibility of the dependency field What was fixed: The “fieldDependency” specDescriptor works properly, the visibility of dependency field is correctly controlled by control field.
Clone Of:
: 1827457 1835775 (view as bug list)
Environment:
Last Closed: 2020-07-13 17:29:11 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Github openshift console pull 5287 None closed Bug 1830125: Add fallback create operand form if schema is missing or invalid 2020-07-02 19:34:00 UTC
Red Hat Product Errata RHBA-2020:2409 None None None 2020-07-13 17:29:31 UTC

Description tony.wu 2020-04-20 19:49:21 UTC
Description of problem:
The "fieldDependency" specDescriptor doesn't work as shown in the reference guide:
https://github.com/openshift/console/blob/master/frontend/packages/operator-lifecycle-manager/src/components/descriptors/reference/reference.md#20-fielddependency


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

How reproducible:
100%


Steps to Reproduce:
1. Install "Business Automation" Operator on an OCP 4.4 Cluster

2. Add "fieldDependency" descriptor into Operator's CSV file
   --> add 
   "- 'urn:alm:descriptor:com.tectonic.ui:fieldDependency:upgrades.enabled:true'"
   as one of the "x-descriptors" for "path: upgrades.minor" specDescriptor field
   (as shown in the reference.md file above)

3. Go to "Create KieApp" change to "Form View"


Actual results:
"Include minor version upgrades" field is always visible.


Expected results:
"Include minor version upgrades" field should only visible when "Enable Upgrades" field is set to "True"

Comment 1 tony.wu 2020-04-20 19:50:44 UTC
Related bug info: https://github.com/openshift/console/issues/4876

Comment 3 Yu Zhao 2020-04-22 17:47:41 UTC
This bug is for release 4.4. In 4.5 the related logic got removed.

Comment 4 Yu Zhao 2020-04-22 20:25:05 UTC
The PR to fix this is here https://github.com/openshift/console/pull/5157

Comment 6 Kirsten Garrison 2020-04-22 22:04:36 UTC
For some reason the github bz integration isn't working and autolinking status to PRs.. manually updated to modified to properly track.

Comment 7 Kirsten Garrison 2020-04-22 22:06:48 UTC
Sorry I meant "Post" as the PR is open but not merged.

Comment 9 Stephen Cuppett 2020-04-23 19:29:40 UTC
Setting target release to current development version (4.5) for investigation. Where fixes (if any) are required/requested for prior versions, cloned BZs will be created when appropriate.

Comment 10 Samuel Padgett 2020-05-14 13:25:29 UTC
This is fixed in master by https://github.com/openshift/console/pull/5287. I'll clone the bug for the 4.4.z fix.

Comment 13 Yanping Zhang 2020-05-18 10:09:25 UTC
Checked on ocp 4.5 cluster with payload: 4.5.0-0.nightly-2020-05-17-201019
Install Install "Business Automation" Operator, in CSV, add 
   "- 'urn:alm:descriptor:com.tectonic.ui:fieldDependency:upgrades.enabled:true'"
   as one of the "x-descriptors" for "path: upgrades.minor" specDescriptor field
Create instance, on the "Form View", see "Enable Upgrades" is default as false, and "Include minor version upgrades" doesn't show up.
Set "Enable Upgrades" as "True", "Include minor version upgrades" shows up and could be set true/false.

Comment 14 errata-xmlrpc 2020-07-13 17:29:11 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, 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/RHBA-2020:2409


Note You need to log in before you can comment on or make changes to this bug.