Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1997419

Summary: Environment page: Invalid form state should disable the save button
Product: OpenShift Container Platform Reporter: yvakil
Component: Dev ConsoleAssignee: yvakil
Status: CLOSED NOTABUG QA Contact: Gajanan More <gamore>
Severity: low Docs Contact:
Priority: low    
Version: 4.9CC: aos-bugs, nmukherj
Target Milestone: ---   
Target Release: 4.9.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-08-26 12:54:27 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 yvakil 2021-08-25 08:31:01 UTC
Description of problem:
When the user makes changes to a BuildConfig (or Pod) with the environment page or tab the form should disable the save button when the form is not filled out correctly.

For example if the user fills our a value without a name.

Prerequisites (if any, like setup, operators/versions):
None

Steps to Reproduce
Open developer perspective and navigate to Builds
Click "Create BuildConfig" button
Create the BuildConfig without additional changes
Switch to the "Environment" tab
Enter an value without a name and press save.
Actual results:
The name field is not marked as required.
The save button is clickable, the form was submitted to the backend and then shows an error like this:
Error "Required value" for field "spec.strategy.sourceStrategy.env[0].name".
Expected results:
The name column should be marked as required with a red asterisk.
The save button should be disabled as long as the form is invalid. The fields which are invalid should show an error so that the user can understand which field is required.
Reproducibility (Always/Intermittent/Only Once):
Always

Build Details:
4.9

Additional info:
This is an follow up on ODC-6206 which changed this behavior. Issue was mentioned by Abhinandan Das

Earlier fields without a name was just dropped. The new version doesn't drop the inserted user data and shows this error.

Comment 1 yvakil 2021-08-26 12:54:27 UTC
admin perspective intentionally leaves the submit button enabled and shows a message if there are missing values.

since it is a shared view in the interest of consistency we are not implementing this