Bug 1404788 - Cannot save an edited class schema, get the error "Error during 'save': Name can't be blank"
Summary: Cannot save an edited class schema, get the error "Error during 'save': Name ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate
Version: 5.7.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: GA
: 5.8.0
Assignee: Harpreet Kataria
QA Contact: Milan Falešník
URL:
Whiteboard: automate
Depends On:
Blocks: 1405177 1419033
TreeView+ depends on / blocked
 
Reported: 2016-12-14 16:18 UTC by Peter McGowan
Modified: 2017-06-12 17:20 UTC (History)
10 users (show)

Fixed In Version: 5.8.0.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1405177 1419033 (view as bug list)
Environment:
Last Closed: 2017-06-12 17:20:24 UTC
Category: ---
Cloudforms Team: CFME Core
Target Upstream Version:
Embargoed:
mfalesni: automate_bug+


Attachments (Terms of Use)

Description Peter McGowan 2016-12-14 16:18:04 UTC
Description of problem:
If I edit a class schema to add a field, I cannot save my changes. I get the error "Error during 'save': Name can't be blank"

Version-Release number of selected component (if applicable):
5.7.0.16.20161213213754_1ad3545 

How reproducible:
Every time

Steps to Reproduce:
1. Create a new domain
2. Copy an existing class such as /System/Policy into the domain
3. Edit the class schema to add a new field at the bottom. Try to save the changes.

Actual results:
"Error during 'save': Name can't be blank"

Expected results:
The schema changes should be saved successfully

Additional info:

Comment 2 Dave Johnson 2016-12-14 20:55:20 UTC
Milan, can you reproduce this?  Do we have a test case and/or automated test around this?

Comment 5 CFME Bot 2016-12-15 19:26:12 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/3d37d467d1d91d4b92db881ebe2494b8226d9e3a

commit 3d37d467d1d91d4b92db881ebe2494b8226d9e3a
Author:     Harpreet Kataria <hkataria>
AuthorDate: Thu Dec 15 10:10:08 2016 -0500
Commit:     Harpreet Kataria <hkataria>
CommitDate: Thu Dec 15 12:25:20 2016 -0500

    Fixed code to expect/set keys as strings instead of symbols in edit hash
    
    This issue was introduced in https://github.com/ManageIQ/manageiq/pull/12322, some of the code is common between class schema editor and method editor that caused schema editor to break.
    Fixed/Added affected spec tests.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1404788

 app/controllers/miq_ae_class_controller.rb       | 22 +++++++-------
 app/views/miq_ae_class/_class_fields.html.haml   | 20 ++++++-------
 spec/controllers/miq_ae_class_controller_spec.rb | 38 +++++++++++++++++++++++-
 3 files changed, 57 insertions(+), 23 deletions(-)

Comment 8 Milan Falešník 2017-02-28 13:48:14 UTC
Verified in 5.8.0.2. I was able to add a new field at the end of a copied class' schema.


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