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:
Milan, can you reproduce this? Do we have a test case and/or automated test around this?
https://github.com/ManageIQ/manageiq/pull/13201
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(-)
Verified in 5.8.0.2. I was able to add a new field at the end of a copied class' schema.