Red Hat Bugzilla – Bug 1278170
[RFE] - Need default validation for data type on TextBox fields when submitting Dialog (Provisioning)
Last modified: 2016-06-29 11:02:30 EDT
Description of problem: Need default validation for data type on TextBox fields when submitting Dialog
Version-Release number of selected component (if applicable):
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.
This is Cap&U?
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.
New commit detected on ManageIQ/manageiq/master:
Author: Bill Wei <email@example.com>
AuthorDate: Mon Jan 25 16:34:31 2016 -0500
Commit: Bill Wei <firstname.lastname@example.org>
CommitDate: Mon Jan 25 16:35:36 2016 -0500
Add validation for integer value
app/models/dialog_field_text_box.rb | 10 +++--
spec/models/dialog_field_text_box_spec.rb | 68 +++++++++++++++++++++----------
2 files changed, 52 insertions(+), 26 deletions(-)
Created attachment 1147933 [details]
Created a dialog with value type Integer .
while ordering the service dialog no validation message is shown .
Not fixed .
Checked in 188.8.131.52-beta2.20160413141124_e25ac0e
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
I left the value as default at the time of ordering service i.e Non integer value for Integer type
BZ https://bugzilla.redhat.com/show_bug.cgi?id=1328226 has been resolved. Please test again.
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?
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.
Tested on 184.108.40.206-rc2.20160531154046_b4e2f6d. No further issues found with validation.
Have you opened BZ(s) to report the other two problems? Please make a link here.
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)
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.