Bug 1161761 - Automate Explorer: "Error during 'save': Validation failed: Datatype is not included in the list" when trying to save input parameters for a Method
Summary: Automate Explorer: "Error during 'save': Validation failed: Datatype is not i...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: UI - OPS
Version: 5.3.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: GA
: 5.3.2
Assignee: Harpreet Kataria
QA Contact: Dave Johnson
URL:
Whiteboard:
Depends On: 1161701
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-11-07 19:33 UTC by Harpreet Kataria
Modified: 2015-03-23 16:09 UTC (History)
6 users (show)

Fixed In Version: 5.3.2
Doc Type: Bug Fix
Doc Text:
In the earlier version of CloudForms Management Engine, an error occurred when trying to edit input parameters for a method in the Automate Explorer. This was due to an incorrect data type assigned to the Automate method input parameters field. This was fixed by changing the data type for the Automate method input parameters field to be 'string'. The Administrator is now able to edit Automate methods as expected.
Clone Of: 1161701
Environment:
Last Closed: 2015-01-14 19:43:05 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:0028 normal SHIPPED_LIVE Important: cfme security, bug fix, and enhancement update 2015-01-15 00:41:27 UTC

Description Harpreet Kataria 2014-11-07 19:33:32 UTC
+++ 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)

Comment 1 CFME Bot 2014-11-14 17:50:45 UTC
New commit detected on cfme/master:
https://github.com/ManageIQ/manageiq/commit/175caf6f4d91aa02c63b044d3eb9e8e8b57b5e6e

commit 175caf6f4d91aa02c63b044d3eb9e8e8b57b5e6e
Author:     Harpreet Kataria <hkataria@redhat.com>
AuthorDate: Fri Nov 7 16:17:12 2014 -0500
Commit:     Harpreet Kataria <hkataria@redhat.com>
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(-)

Comment 2 CFME Bot 2014-11-14 17:51:04 UTC
New commit detected on manageiq/master:
https://github.com/ManageIQ/manageiq/commit/175caf6f4d91aa02c63b044d3eb9e8e8b57b5e6e

commit 175caf6f4d91aa02c63b044d3eb9e8e8b57b5e6e
Author:     Harpreet Kataria <hkataria@redhat.com>
AuthorDate: Fri Nov 7 16:17:12 2014 -0500
Commit:     Harpreet Kataria <hkataria@redhat.com>
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(-)

Comment 3 CFME Bot 2014-11-14 18:15:25 UTC
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@redhat.com>
AuthorDate: Wed Nov 12 13:58:10 2014 -0500
Commit:     Harpreet Kataria <hkataria@redhat.com>
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(-)

Comment 5 Shveta 2015-01-08 17:19:11 UTC
Fixed .
Verified in 5.3.2.5.20141218144833_50406a5

Comment 7 errata-xmlrpc 2015-01-14 19:43:05 UTC
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


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