Bug 1319781 - Default validation for data type is not properly set when adding a new TextBox field
Summary: Default validation for data type is not properly set when adding a new TextBo...
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: UI - OPS
Version: 5.6.0
Hardware: Unspecified
OS: Unspecified
Target Milestone: GA
: 5.8.0
Assignee: Harpreet Kataria
QA Contact: Shveta
Whiteboard: ui:dialog
Depends On: 1278170
Blocks: 1348638 1406434 1406436
TreeView+ depends on / blocked
Reported: 2016-03-21 14:07 UTC by Chris Pelland
Modified: 2017-06-12 16:13 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
: 1348638 1406434 1406436 (view as bug list)
Last Closed: 2017-06-12 16:13:48 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:

Attachments (Terms of Use)
value validator (78.75 KB, image/png)
2016-04-16 19:05 UTC, Shveta
no flags Details
Integer type (91.58 KB, image/png)
2016-09-19 19:37 UTC, Shveta
no flags Details

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: 

Comment 1 Harpreet Kataria 2016-03-21 14:12:13 UTC

Comment 2 CFME Bot 2016-03-21 22:35:30 UTC
New commit detected on ManageIQ/manageiq/master:

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.

 .../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

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

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


Comment 10 Shveta 2016-07-05 19:12:46 UTC
Checked in latest build 
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

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

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.

 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 :

Comment 15 Shveta 2016-12-16 08:14:04 UTC
Assigning it to Harpreet again .
Please check appliance . 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:

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.

 .../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

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