Bug 1820208

Summary: Integer field stays in incorrect value state after correcting the value
Product: [oVirt] ovirt-engine Reporter: Ivana Saranova <isaranov>
Component: Frontend.WebAdminAssignee: rszwajko
Status: CLOSED CURRENTRELEASE QA Contact: Michael Burman <mburman>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.4.0CC: bugs, mburman, michal.skrivanek, mtessun, rszwajko, sgratch
Target Milestone: ovirt-4.4.1Flags: pm-rhel: ovirt-4.4+
mtessun: planning_ack+
sgratch: devel_ack+
lleistne: testing_ack+
Target Release: 4.4.1.7   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-engine-4.4.1.7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-08-05 06:24:52 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: UX RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ivana Saranova 2020-04-02 14:05:28 UTC
Description of problem:
Integer field does not update its state correctly after it had wrong value inside changed back to the valid one. Form cannot be submitted - for example, in case of changing the 'Total Virtual CPUs' in 'Edit VM' dialogue, the 'System' tab has red font, but there are no red text fields in it. When I hover over the text field that has now correct value, tooltip with text 'This field must contain an integer number between 1 and 384.' appears.

Version-Release number of selected component (if applicable):
ovirt-engine-4.4.0-0.0.master.20200317103500.git3e2b0274306.el8.noarch

How reproducible:
Always

Steps to Reproduce:
1. Find text field that accepts only integers and is not optional ('Edit VM' -> 'System' -> 'Total Virtual CPUs')
2. Write non-integer value into it (e.g. 'aaa')
3. Leave the field/Submit the changes (Should not pass)
4. Change the value back to the correct value (e.g. 1)
5. Submit the changes (Should pass)

Actual results:
Form cannot be submitted. Behaviour described in description.

Expected results:
Form can be submitted and field is updated so that it's not marked as having incorrect value in it.

Additional info:

Comment 1 rszwajko 2020-04-03 08:10:57 UTC
Quick debug shows that UnitVmModel uses following pattern for validation of hardware config:
> setValidTab(TabName.SYSTEM_TAB, isValidTab(TabName.SYSTEM_TAB) && ... && getTotalCPUCores().getIsValid() && ...);
Once the system tab is invalid it cannot be valid again.
Note that this seems to be a problem only on Virtual Machines screen (and perhaps other that use the same pattern) i.e. 
'Network' -> new/edit works correctly.

Comment 2 Michael Burman 2020-07-09 12:55:39 UTC
Verified on - rhvm-4.4.1.8-0.7.el8ev.noarch

Comment 3 Sandro Bonazzola 2020-08-05 06:24:52 UTC
This bugzilla is included in oVirt 4.4.1 release, published on July 8th 2020.

Since the problem described in this bug report should be resolved in oVirt 4.4.1 release, it has been closed with a resolution of CURRENT RELEASE.

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