Bug 1705013 - Validation Button for Dialogs work weird in CloudForms
Summary: Validation Button for Dialogs work weird in CloudForms
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: UI - OPS
Version: 5.10.3
Hardware: Unspecified
OS: Unspecified
medium
high
Target Milestone: GA
: 5.11.0
Assignee: Martin Hradil
QA Contact: Niyaz Akhtar Ansari
Red Hat CloudForms Documentation
URL:
Whiteboard:
Depends On:
Blocks: 1717704
TreeView+ depends on / blocked
 
Reported: 2019-05-01 05:40 UTC by Khushbu Borole
Modified: 2019-12-13 15:00 UTC (History)
9 users (show)

Fixed In Version: 5.11.0.7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1717704 (view as bug list)
Environment:
Last Closed: 2019-12-13 15:00:33 UTC
Category: ---
Cloudforms Team: CFME Core
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Khushbu Borole 2019-05-01 05:40:42 UTC
Description of problem:
The way to configure field validation is new and works in a weird manner. There is now a new switch indicating whether there is regex-based field validation or not, and separately a text box for the regex as before.

By default in Web UI, the new switch is halfway between Yes and No. User can turn it to Yes position, which works OK.

But if the user turns it to the No position, and saves the dialog,  it will be again halfway between Yes and No when the user opens the dialog editor next time.

The logic is not fully clear.


Version-Release number of selected component (if applicable):
Red Hat CloudForms 5.10.3

How reproducible:
Always

Steps to Reproduce:
1. Create a Dialog with text box validation button
2. Give a validation Regex expression
3. Move the button 'No'

Actual results:
it will be again halfway between Yes and No when the user opens the dialog editor next time.

Expected results:
It should be either Yes/No as per previously saved data

Comment 4 Dave Johnson 2019-05-01 08:01:41 UTC
Please assess the impact of this issue and update the severity accordingly.  Please refer to https://bugzilla.redhat.com/page.cgi?id=fields.html#bug_severity for a reminder on each severity's definition.

If it's something like a tracker bug where it doesn't matter, please set the severity to Low.

Comment 9 CFME Bot 2019-05-31 12:47:35 UTC
New commit detected on ManageIQ/ui-components/master:

https://github.com/ManageIQ/ui-components/commit/3ae4ba1a82ed38e33f322dde40abefd3c2417151
commit 3ae4ba1a82ed38e33f322dde40abefd3c2417151
Author:     Martin Hradil <mhradil>
AuthorDate: Thu May 23 07:59:46 2019 -0400
Commit:     Martin Hradil <mhradil>
CommitDate: Thu May 23 07:59:46 2019 -0400

    dialog-editor-validation - chane validator_type false value from undefined to false

    to work around angular-bootstrap-switch parsing "undefined" as an indeterminate value (undecided switch)
    (https://github.com/frapontillo/angular-bootstrap-switch/issues/138)

    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1705013

 src/dialog-editor/components/validation/validation.html | 2 +-
 src/dialog-editor/components/validation/validation.ts | 8 +
 2 files changed, 9 insertions(+), 1 deletion(-)

Comment 11 Niyaz Akhtar Ansari 2019-06-14 09:58:43 UTC
I have tested this in 5.11 and same issue present in 5.11.0.8
failing this BZ. see comments https://bugzilla.redhat.com/show_bug.cgi?id=1717704#c4

Comment 12 Martin Hradil 2019-06-17 09:55:45 UTC
Just to be clear, the reason this is failed has nothing to do with the original bug.

> Steps to reproduce.
>
> 1. Create a dialog. Set regex_validation in text box ->  ^[0-9]*$ 
> 2. Save the dialog
> 3. Edit the dialog and disable the validation button of text box 
> 2. Use the dialog in a catalog.
> 3. In catalog order page

> except the format " ^[0-9]*$ " you input anything else it gives below validation error 
> --> Entered text should match the format: ^[0-9]*$


The original bug in the dialog-editor component is fixed, but a related bug is also present in the dialog-user component.


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