Description of problem: When modifying a validated class attribute, the changes are discarded, making it impossible to update a class schema after creation. The same behavior is observed when the 'Edit selected schema' is used. The first validated default value seems to be immutable. Version-Release number of selected component (if applicable): 5.7.0.7-beta1.20161025153249_9376fbd How reproducible: always Steps to Reproduce: 1. Create a class with an attribute called 'field1' of type string, with a default value of 'a' and click on the 'tick' symbol to validate it. 2. Change the default value to 'b' and click 'Save'. Actual results: The recorded default value is still 'a'. Expected results: The recorded value should be 'b'. Additional info: Below, the log line in /var/www/miq/vmdb/log/evm.log [----] I, [2016-10-27T08:42:21.598499 #25428:a5ace4] INFO -- Success: MIQ(MiqAeClassController.update_fields) userid: [admin] - [Test] Record updated (fields:[[{"aetype"=>"attribute", "class_id"=>33000000000149, "collect"=>nil, "datatype"=>"[FILTERED]", "default_value"=>"a", "description"=>nil, "display_name"=>nil, "id"=>33000000001330, "max_retries"=>nil, "max_time"=>nil, "message"=>"create", "name"=>"field1", "on_entry"=>nil, "on_error"=>nil, "on_exit"=>nil, "priority"=>1, "substitute"=>true}]] to [[{"aetype"=>"attribute", "class_id"=>33000000000149, "collect"=>nil, "datatype"=>"[FILTERED]", "default_value"=>"a", "description"=>nil, "display_name"=>nil, "id"=>33000000001330, "max_retries"=>nil, "max_time"=>nil, "message"=>"create", "name"=>"field1", "on_entry"=>nil, "on_error"=>nil, "on_exit"=>nil, "priority"=>1, "substitute"=>true, :default_value=>"b"}]]) As you can see, the correct information is passed. There is no additionnal log.
https://github.com/ManageIQ/manageiq/pull/12322
New commit detected on ManageIQ/manageiq/master: https://github.com/ManageIQ/manageiq/commit/b28d17cbaa73ca7bd0f090b386109ac66d73eeba commit b28d17cbaa73ca7bd0f090b386109ac66d73eeba Author: Harpreet Kataria <hkataria> AuthorDate: Mon Oct 31 22:08:42 2016 -0400 Commit: Harpreet Kataria <hkataria> CommitDate: Tue Nov 1 10:17:50 2016 -0400 Changed to have consistency in keys in schema editor - Made changes to automate schema editor code to get/set all keys in @edit as symbols, some of the keys in existing code were symbols and others were strings, changed them all to be symbols. - Added spec test to verify changes and fixed any existing broken spec tests. https://bugzilla.redhat.com/show_bug.cgi?id=1389187 app/controllers/miq_ae_class_controller.rb | 21 +++--- app/views/miq_ae_class/_class_fields.html.haml | 24 +++---- spec/controllers/miq_ae_class_controller_spec.rb | 75 +++++++++++++++------- .../miq_ae_class/_class_fields.html.haml_spec.rb | 57 ++++++++++++++++ 4 files changed, 133 insertions(+), 44 deletions(-) create mode 100644 spec/views/miq_ae_class/_class_fields.html.haml_spec.rb
New commit detected on ManageIQ/manageiq/euwe: https://github.com/ManageIQ/manageiq/commit/a3d263ac8e2a6ce288fc07b74e0d02cc06149ab2 commit a3d263ac8e2a6ce288fc07b74e0d02cc06149ab2 Author: Dan Clarizio <dclarizi> AuthorDate: Thu Nov 3 14:24:57 2016 -0700 Commit: Oleg Barenboim <chessbyte> CommitDate: Mon Nov 7 15:51:10 2016 -0500 Merge pull request #12322 from h-kataria/class_schema_editor_fix Changed to have consistency in keys in schema editor (cherry picked from commit 32f1bc8cc20dec7bbed5caf52f90b874f1c533cc) https://bugzilla.redhat.com/show_bug.cgi?id=1389187 app/controllers/miq_ae_class_controller.rb | 21 +++--- app/views/miq_ae_class/_class_fields.html.haml | 24 +++---- spec/controllers/miq_ae_class_controller_spec.rb | 75 +++++++++++++++------- .../miq_ae_class/_class_fields.html.haml_spec.rb | 57 ++++++++++++++++ 4 files changed, 133 insertions(+), 44 deletions(-) create mode 100644 spec/views/miq_ae_class/_class_fields.html.haml_spec.rb
*** Bug 1396412 has been marked as a duplicate of this bug. ***
*** Bug 1399285 has been marked as a duplicate of this bug. ***
Default value changes. verified in 5.8.0.4.20170307183144_745a3d9