Bug 1769960 - Regex validation not working when using dialogs
Summary: Regex validation not working when using dialogs
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate
Version: 5.10.8
Hardware: All
OS: All
high
high
Target Milestone: GA
: 5.12.0
Assignee: Martin Hradil
QA Contact: Niyaz Akhtar Ansari
Red Hat CloudForms Documentation
URL:
Whiteboard:
Depends On:
Blocks: 1773626 1773627
TreeView+ depends on / blocked
 
Reported: 2019-11-07 19:40 UTC by Tuan
Modified: 2023-03-24 15:56 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1773626 1773627 (view as bug list)
Environment:
Last Closed: 2020-06-10 12:59:34 UTC
Category: Bug
Cloudforms Team: CFME Core
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Tuan 2019-11-07 19:40:39 UTC
Description of problem:
After updating to 5.10.11. Past Regex issue is reoccurring 

"when we first load the dialog, if there is no value supplied, we don't validate it is a regex and then we don't fix it afterwards on a triggered refresh"

This seems to be a regression from: https://bugzilla.redhat.com/show_bug.cgi?id=1702064

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

How reproducible:
Always

Steps to Reproduce:
1. 
2.
3.

Actual results:


Expected results:


Additional info:

New logs: http://file.rdu.redhat.com/tuado/logs/tva02512539/

Comment 2 Dave Johnson 2019-11-07 21:04:40 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 14 Tina Fitzgerald 2019-11-15 19:43:34 UTC
Hi Tuan,

As Martin stated in comment 10, the customer can set the regular expression validator rule to their Automate method as a workaround until the fix is available.

Custom Automate method: /TVA/Integration/DynamicDialogs/Dialogs/regex_validation

Can you ask the customer to add the following line before the exit MIQ_OK?

Add this:
  $evm.object['validator_rule'] = 'regex'

Before this:
  exit MIQ_OK if template.blank?

This should resolve their performance issue having to execute the entire method even when the template is blank.

Let me know if you have any questions.

Thanks,
Tina

Comment 15 CFME Bot 2019-11-18 15:07:34 UTC
New commit detected on ManageIQ/ui-components/master:

https://github.com/ManageIQ/ui-components/commit/172297da2e91b9643368af568c9aae965e2ce2e6
commit 172297da2e91b9643368af568c9aae965e2ce2e6
Author:     Martin Hradil <mhradil>
AuthorDate: Fri Nov 15 07:51:00 2019 -0500
Commit:     Martin Hradil <mhradil>
CommitDate: Fri Nov 15 07:51:00 2019 -0500

    DialogUser - update validator_type during field refresh

    when validator_type is set to 'regex' on load, the field will use the current validator_rule to validate,
    but if validator_type is changed only later in a method, the field never starts to validate.

    Making sure both validator_rule and validator_type are respected during field refresh.

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

 src/dialog-user/components/dialog-user/dialogUser.ts | 1 +
 1 file changed, 1 insertion(+)


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