+++ This bug was initially created as a clone of Bug #1161701 +++ Description of problem:"Error during 'save': Validation failed: Datatype is not included in the list" when trying to save input parameters for a Method Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. Edit a Method in Automate Explorer 2. Save Input Parameters for a method. 3. Go back to same method, deleted existing Input Parameters, then try to save input parameters with same name, that displays flash message on screen: Error during 'save': Validation failed: Datatype is not included in the list Actual results: Flash message on screen. doesn't let user save input parameters Expected results: It should save new added input parameters. Additional info: --- Additional comment from on 2014-11-07 11:45:31 EST --- I also noticed that the datatype is not being set to string for the fields even though it shows as string in the UI. In our model code validates_inclusion_of :datatype, :in => AVAILABLE_DATATYPES, :allow_nil => true # nil = > string we allow for nil to be equivalent to strings. We should select the datatype to be string and autoselect it instead of using nil to mean string. The order of the datatypes is pre canned to be AVAILABLE_DATATYPES_FOR_UI = [ "string", "symbol", "integer", "float", "boolean", "time", "array", "password"] If someone changes this array to have integer to be first element the user would think that the datatype is integer but we will set it to nil (string)
New commit detected on cfme/master: https://github.com/ManageIQ/manageiq/commit/175caf6f4d91aa02c63b044d3eb9e8e8b57b5e6e commit 175caf6f4d91aa02c63b044d3eb9e8e8b57b5e6e Author: Harpreet Kataria <hkataria> AuthorDate: Fri Nov 7 16:17:12 2014 -0500 Commit: Harpreet Kataria <hkataria> CommitDate: Wed Nov 12 13:58:10 2014 -0500 Fixed saving on Input Parameters for Automate Method. - Fixed to set/save default value for datatype of an Automate Method Input field to be 'string'. - Fixed saving of input parameters when adding a new Method. https://bugzilla.redhat.com/show_bug.cgi?id=1161761 https://bugzilla.redhat.com/show_bug.cgi?id=1161701 vmdb/app/controllers/miq_ae_class_controller.rb | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-)
New commit detected on manageiq/master: https://github.com/ManageIQ/manageiq/commit/175caf6f4d91aa02c63b044d3eb9e8e8b57b5e6e commit 175caf6f4d91aa02c63b044d3eb9e8e8b57b5e6e Author: Harpreet Kataria <hkataria> AuthorDate: Fri Nov 7 16:17:12 2014 -0500 Commit: Harpreet Kataria <hkataria> CommitDate: Wed Nov 12 13:58:10 2014 -0500 Fixed saving on Input Parameters for Automate Method. - Fixed to set/save default value for datatype of an Automate Method Input field to be 'string'. - Fixed saving of input parameters when adding a new Method. https://bugzilla.redhat.com/show_bug.cgi?id=1161761 https://bugzilla.redhat.com/show_bug.cgi?id=1161701 vmdb/app/controllers/miq_ae_class_controller.rb | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-)
New commit detected on cfme/5.3.z: https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=4161e1b68f7fbe22e5515df9e482305a8a5cc104 commit 4161e1b68f7fbe22e5515df9e482305a8a5cc104 Author: Harpreet Kataria <hkataria> AuthorDate: Wed Nov 12 13:58:10 2014 -0500 Commit: Harpreet Kataria <hkataria> CommitDate: Fri Nov 14 13:10:40 2014 -0500 Fixed saving on Input Parameters for Automate Method. - Fixed to set/save default value for datatype of an Automate Method Input field to be 'string'. - Fixed saving of input parameters when adding a new Method. https://bugzilla.redhat.com/show_bug.cgi?id=1161761 https://bugzilla.redhat.com/show_bug.cgi?id=1161701 (cherry picked from commit 175caf6) vmdb/app/controllers/miq_ae_class_controller.rb | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-)
Fixed . Verified in 5.3.2.5.20141218144833_50406a5
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://rhn.redhat.com/errata/RHSA-2015-0028.html