Bug 1319781

Summary: Default validation for data type is not properly set when adding a new TextBox field
Product: Red Hat CloudForms Management Engine Reporter: Chris Pelland <cpelland>
Component: UI - OPSAssignee: Harpreet Kataria <hkataria>
Status: CLOSED CURRENTRELEASE QA Contact: Shveta <sshveta>
Severity: unspecified Docs Contact:
Priority: medium    
Version: 5.6.0CC: dclarizi, hkataria, jhardy, mfeifer, mpovolny, obarenbo, simaishi, sshveta
Target Milestone: GAKeywords: FutureFeature, TestOnly, ZStream
Target Release: 5.8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: ui:dialog
Fixed In Version: 5.8.0.0 Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
: 1348638 1406434 1406436 (view as bug list) Environment:
Last Closed: 2017-06-12 16:13:48 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1278170    
Bug Blocks: 1348638, 1406434, 1406436    
Attachments:
Description Flags
value validator
none
Integer type none

Description Chris Pelland 2016-03-21 14:07:11 UTC
This is the Web UI portion of the RFE:

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.


Note that the Provisioning Portion of the RFE is: 
https://bugzilla.redhat.com/show_bug.cgi?id=1278170

Comment 1 Harpreet Kataria 2016-03-21 14:12:13 UTC
https://github.com/ManageIQ/manageiq/pull/5281

Comment 2 CFME Bot 2016-03-21 22:35:30 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/3c3eb12e07994e20c1a31fa25b272292efe3d110

commit 3c3eb12e07994e20c1a31fa25b272292efe3d110
Author:     Harpreet Kataria <hkataria>
AuthorDate: Wed Nov 4 11:56:50 2015 -0500
Commit:     Harpreet Kataria <hkataria>
CommitDate: Mon Mar 21 10:08:53 2016 -0400

    Added data_type support for textbox field in Dialog editor.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1319781

 .../miq_ae_customization_controller/dialogs.rb     |  3 +
 .../_dialog_field_form.html.haml                   | 11 +++
 .../dialogs_spec.rb                                | 91 +++-------------------
 3 files changed, 25 insertions(+), 80 deletions(-)

Comment 4 Shveta 2016-04-16 19:05:24 UTC
Created attachment 1148011 [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 5 Harpreet Kataria 2016-04-25 18:37:43 UTC
Currently the textbox for integer has some problems reported in https://bugzilla.redhat.com/show_bug.cgi?id=1328226

Please retest after those are fixed.

Comment 6 Shveta 2016-04-26 22:09:07 UTC
Will check in next build.

Comment 9 Harpreet Kataria 2016-07-05 13:43:43 UTC
Shveta,

Can you re-test this issue, please let me know if this has been fixed with the fix for https://bugzilla.redhat.com/show_bug.cgi?id=1328226

Thanks,
~Harpreet

Comment 10 Shveta 2016-07-05 19:12:46 UTC
Checked in latest build 5.6.0.13.20160624114606_13a9153 
Created a service dialog with type Integer for Textbox.
While ordering service gave a string value but No validation message shown.

Comment 11 Harpreet Kataria 2016-07-07 21:20:22 UTC
https://github.com/ManageIQ/manageiq/pull/9674

Comment 12 CFME Bot 2016-07-13 22:36:00 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/b0894e1e50c1d45256d032e890af6ead7dffe4db

commit b0894e1e50c1d45256d032e890af6ead7dffe4db
Author:     Harpreet Kataria <hkataria>
AuthorDate: Thu Jul 7 17:13:48 2016 -0400
Commit:     Harpreet Kataria <hkataria>
CommitDate: Thu Jul 7 17:20:53 2016 -0400

    Initialize data type for TextBox field to be string by default.
    
    Data type for TextBox field was being set to to nil by default, this was causing validation issues when dialog was submitted.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1319781
    https://bugzilla.redhat.com/show_bug.cgi?id=1348638

 app/controllers/miq_ae_customization_controller/dialogs.rb | 5 +++++
 1 file changed, 5 insertions(+)

Comment 13 Shveta 2016-09-19 19:37:47 UTC
Created attachment 1202620 [details]
Integer type

Still not fixed.Attached screenshot shows dialog with type Integer and while ordering no validation message was shown when I entered string value.

Same goes for Value type = String . While ordering I gave integer values and no validation was shown .

Build : 5.7.0.0.20160906172503_12f65cb

Comment 15 Shveta 2016-12-16 08:14:04 UTC
Assigning it to Harpreet again .
Please check appliance https://10.8.197.183 . Created a dialog with type TextBox and value Integer.
While ordering the catalog item OUI.. gave string value , no validation message was shown

Comment 18 CFME Bot 2016-12-19 22:21:05 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/4a008b986a70b78e0af83366463d1287333e6dbf

commit 4a008b986a70b78e0af83366463d1287333e6dbf
Author:     Harpreet Kataria <hkataria>
AuthorDate: Sun Dec 18 15:16:37 2016 -0500
Commit:     Harpreet Kataria <hkataria>
CommitDate: Sun Dec 18 15:16:37 2016 -0500

    Fixed params[:field_typ] value check.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1319781

 .../miq_ae_customization_controller/dialogs.rb     |  2 +-
 .../dialogs_spec.rb                                | 32 ++++++++++++++++++++++
 2 files changed, 33 insertions(+), 1 deletion(-)

Comment 21 Shveta 2017-03-02 20:39:44 UTC
Fixed in 5.8.0.2-nightly.20170228141623_8710eed