Bug 1278170 - [RFE] - Need default validation for data type on TextBox fields when submitting Dialog (Provisioning)
[RFE] - Need default validation for data type on TextBox fields when submitti...
Status: CLOSED ERRATA
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Provisioning (Show other bugs)
5.6.0
Unspecified Unspecified
low Severity low
: GA
: 5.6.0
Assigned To: Bill Wei
Jiri Stefanisin
ui automate
: FutureFeature
Depends On:
Blocks: 1319781
  Show dependency treegraph
 
Reported: 2015-11-04 15:15 EST by Harpreet Kataria
Modified: 2016-06-29 11:02 EDT (History)
12 users (show)

See Also:
Fixed In Version: 5.6.0.0
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-06-29 11:02:30 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
value validator (78.75 KB, image/png)
2016-04-16 14:24 EDT, Shveta
no flags Details

  None (edit)
Description Harpreet Kataria 2015-11-04 15:15:46 EST
Description of problem: Need default validation for data type on TextBox fields when submitting Dialog


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


How reproducible:


Steps to Reproduce:
1. Create Dialog with dialog field TextBox and set data type as integer for this field
2. Create a Catalog Item and assign the Dialog created in step 1
3. Go Service Catalog and order a service, when submitting the dialog, it should do default validation on data type for Textbox fields.

Actual results:


Expected results:


Additional info:
Comment 4 Greg Blomquist 2015-11-05 10:17:45 EST
This is Cap&U?
Comment 5 Greg McCullough 2016-01-25 10:59:00 EST
Discussed with Bill - We will add default validation to the text field for integer types.  The user can override with their own regex and the field can still be blank if the field is not required.
Comment 7 CFME Bot 2016-01-29 15:11:19 EST
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/9e969600d2f2a4dbae5f529cdb30e1d32995801a

commit 9e969600d2f2a4dbae5f529cdb30e1d32995801a
Author:     Bill Wei <bilwei@redhat.com>
AuthorDate: Mon Jan 25 16:34:31 2016 -0500
Commit:     Bill Wei <bilwei@redhat.com>
CommitDate: Mon Jan 25 16:35:36 2016 -0500

    Add validation for integer value
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1278170

 app/models/dialog_field_text_box.rb       | 10 +++--
 spec/models/dialog_field_text_box_spec.rb | 68 +++++++++++++++++++++----------
 2 files changed, 52 insertions(+), 26 deletions(-)
Comment 8 Shveta 2016-04-16 14:24 EDT
Created attachment 1147933 [details]
value validator

Created a dialog with value type Integer .
while ordering the service dialog no validation message is shown .

Not fixed .
Checked in 5.6.0.1-beta2.20160413141124_e25ac0e
Comment 9 Bill Wei 2016-04-18 15:04:54 EDT
Shveta,

In your attachment you created a textbox with default but non-integer value. Did you change the value at testing time or leave it as default? 

Right now the textbox for integer has some problems reported in https://bugzilla.redhat.com/show_bug.cgi?id=1328226
Comment 10 Shveta 2016-04-19 13:53:03 EDT
Bill , 

I left the value as default at the time of ordering service i.e Non integer value for Integer type
Comment 11 Bill Wei 2016-05-16 14:12:33 EDT
BZ https://bugzilla.redhat.com/show_bug.cgi?id=1328226 has been resolved. Please test again.
Comment 12 Jiri Stefanisin 2016-06-08 03:33:18 EDT
Hello,
I am trying to test this functionality but on 5.6 when I provision simple int field and try to submit the order, there is no error if i enter any char either. Am I missing something here?
Comment 13 Bill Wei 2016-06-08 15:23:48 EDT
Jiri,

You just uncovered two bugs, both occur only when you use the UI to create a customized textbox. When you create a textbox the default data type is integer, if you never change the type by accepting the default, the textbox actually does not have a type. This is a first bug that you should report. 

Second bug, the default value for the textbox is always "", which of cause if not appropriate for an integer type. The default value should be left as nil. 

To test this BZ you can workaround by editing the textbox type, first select string and then switch back to integer. After saving your change you should be able to continue the verification.
Comment 14 Jiri Stefanisin 2016-06-13 04:29:02 EDT
Tested on 5.6.0.9-rc2.20160531154046_b4e2f6d. No further issues found with validation.
Comment 15 Bill Wei 2016-06-13 17:50:58 EDT
Jiri,

Have you opened BZ(s) to report the other two problems? Please make a link here.
Comment 16 Jiri Stefanisin 2016-06-14 01:48:25 EDT
Hello,
new bugs are reported.

Default type of TexBox is not set up (https://bugzilla.redhat.com/show_bug.cgi?id=1344627)

Default value of TexBox does not correspond to its type (https://bugzilla.redhat.com/show_bug.cgi?id=1344632)
Comment 18 errata-xmlrpc 2016-06-29 11:02:30 EDT
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-2016:1348

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