Description of problem: 1. When a user types an invalid number, for example "abc", the value of the field gets converted to 0 without any warning or error message. 2. If the default value is a valid number and the user does not modify the value, the final value of the field is the default value as a string. Note the default value column in the dialog_fields table is text. 3. If the user has a valid number input, the #validate_field_data method raises an error because the value already get converted to number which does not support a regex match operation. Note no. 3 may not be a bug but we need to find the right place to do regex validation. Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
https://github.com/ManageIQ/manageiq/pull/8401
New commit detected on ManageIQ/manageiq/master: https://github.com/ManageIQ/manageiq/commit/c14696d0f354daf54fe481a520cd2e820cdac869 commit c14696d0f354daf54fe481a520cd2e820cdac869 Author: Erik Clarizio <eclarizi> AuthorDate: Mon May 2 13:46:07 2016 -0700 Commit: Erik Clarizio <eclarizi> CommitDate: Wed May 4 10:56:31 2016 -0700 Add error handling to integer data type dialog text box https://bugzilla.redhat.com/show_bug.cgi?id=1328226 app/controllers/application_controller/dialog_runner.rb | 1 - app/models/dialog_field_text_box.rb | 8 +++++--- spec/models/dialog_field_text_box_spec.rb | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-)
New commit detected on ManageIQ/manageiq/master: https://github.com/ManageIQ/manageiq/commit/c55986f160b689e34b03dca3d15e917b1d670aa2 commit c55986f160b689e34b03dca3d15e917b1d670aa2 Author: Erik Clarizio <eclarizi> AuthorDate: Mon May 2 13:46:38 2016 -0700 Commit: Erik Clarizio <eclarizi> CommitDate: Wed May 4 10:56:31 2016 -0700 Ensure that the value returned from #value follows the data_type https://bugzilla.redhat.com/show_bug.cgi?id=1328226 Along with this, support data_type property for dynamic text boxes app/models/dialog_field_text_box.rb | 4 +-- spec/models/dialog_field_text_box_spec.rb | 53 ++++++++++++++++++++++++++----- 2 files changed, 47 insertions(+), 10 deletions(-)
New commit detected on ManageIQ/manageiq/master: https://github.com/ManageIQ/manageiq/commit/0186bae03480c0d7949cc535d8f2061bdbfae2db commit 0186bae03480c0d7949cc535d8f2061bdbfae2db Author: Erik Clarizio <eclarizi> AuthorDate: Tue May 3 11:02:37 2016 -0700 Commit: Erik Clarizio <eclarizi> CommitDate: Wed May 4 10:56:32 2016 -0700 Preserve nils instead of converting to 0 for integer text box https://bugzilla.redhat.com/show_bug.cgi?id=1328226 app/models/dialog_field_text_box.rb | 1 + spec/models/dialog_field_text_box_spec.rb | 17 ++++++++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-)
New commit detected on ManageIQ/manageiq/master: https://github.com/ManageIQ/manageiq/commit/476d60ba115e0f8750a2955d7eec2f8d680f8286 commit 476d60ba115e0f8750a2955d7eec2f8d680f8286 Author: Erik Clarizio <eclarizi> AuthorDate: Tue May 3 11:03:46 2016 -0700 Commit: Erik Clarizio <eclarizi> CommitDate: Wed May 4 10:56:32 2016 -0700 Fix rubocop issue by freezing mutable object https://bugzilla.redhat.com/show_bug.cgi?id=1328226 app/models/dialog_field_text_box.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commit detected on ManageIQ/manageiq/master: https://github.com/ManageIQ/manageiq/commit/c522b293aaebe34a310e050dd5ba86919d956431 commit c522b293aaebe34a310e050dd5ba86919d956431 Author: Erik Clarizio <eclarizi> AuthorDate: Wed May 4 10:55:10 2016 -0700 Commit: Erik Clarizio <eclarizi> CommitDate: Wed May 4 10:56:32 2016 -0700 Convert values by data_type for #value and #automate_output_value https://bugzilla.redhat.com/show_bug.cgi?id=1328226 app/models/dialog_field_text_box.rb | 12 +++++-- spec/models/dialog_field_text_box_spec.rb | 54 +++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+), 3 deletions(-)
https://github.com/ManageIQ/manageiq/pull/8407
https://github.com/ManageIQ/manageiq/pull/8473
Fixed. Verified in 5.6.0.7-beta2.6.20160516171555_b1be31f
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