Bug 1278170 - [RFE] - Need default validation for data type on TextBox fields when submitting Dialog (Provisioning)
Summary: [RFE] - Need default validation for data type on TextBox fields when submitti...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Provisioning
Version: 5.6.0
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: GA
: 5.6.0
Assignee: Bill Wei
QA Contact: Jiri Stefanisin
URL:
Whiteboard: ui automate
Depends On:
Blocks: 1319781
TreeView+ depends on / blocked
 
Reported: 2015-11-04 20:15 UTC by Harpreet Kataria
Modified: 2016-06-29 15:02 UTC (History)
12 users (show)

Fixed In Version: 5.6.0.0
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-06-29 15:02:30 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


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


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1348 0 normal SHIPPED_LIVE CFME 5.6.0 bug fixes and enhancement update 2016-06-29 18:50:04 UTC

Description Harpreet Kataria 2015-11-04 20:15:46 UTC
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 15:17:45 UTC
This is Cap&U?

Comment 5 Greg McCullough 2016-01-25 15:59:00 UTC
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 20:11:19 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/9e969600d2f2a4dbae5f529cdb30e1d32995801a

commit 9e969600d2f2a4dbae5f529cdb30e1d32995801a
Author:     Bill Wei <bilwei>
AuthorDate: Mon Jan 25 16:34:31 2016 -0500
Commit:     Bill Wei <bilwei>
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 18:24:47 UTC
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 19:04:54 UTC
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 17:53:03 UTC
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 18:12:33 UTC
BZ https://bugzilla.redhat.com/show_bug.cgi?id=1328226 has been resolved. Please test again.

Comment 12 Jiri Stefanisin 2016-06-08 07:33:18 UTC
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 19:23:48 UTC
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 08:29:02 UTC
Tested on 5.6.0.9-rc2.20160531154046_b4e2f6d. No further issues found with validation.

Comment 15 Bill Wei 2016-06-13 21:50:58 UTC
Jiri,

Have you opened BZ(s) to report the other two problems? Please make a link here.

Comment 16 Jiri Stefanisin 2016-06-14 05:48:25 UTC
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 15:02:30 UTC
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.