Created attachment 1176278 [details] screenshot Description of problem: Version-Release number of selected component (if applicable): Version: 5.5.5.0.20160628144838_629f93b How reproducible: 100% Steps to Reproduce: 1.Navigate to Automate->Customization 2.Click the Buttons Accordion 3.Select any Object Types tree->Click Configuration then Add a new Button 4.Click on created button->Configuration->Click on Simulate Actual results: When clicked on Simulate it throws Unexpected error encountered "wrong constant name Cluster / Deployment Role [miq_ae_customization/resolve] " Expected results: No Error Additional info: Production Log: [----] I, [2016-07-05T03:22:20.237670 #3030:12bb988] INFO -- : Started POST "/miq_ae_customization/resolve/1" for 127.0.0.1 at 2016-07-05 03:22:20 -0400 [----] I, [2016-07-05T03:22:20.239889 #3030:12bb988] INFO -- : Processing by MiqAeCustomizationController#resolve as JS [----] I, [2016-07-05T03:22:20.240053 #3030:12bb988] INFO -- : Parameters: {"button"=>"simulate", "id"=>"1"} [----] F, [2016-07-05T03:22:20.295935 #3030:12bb988] FATAL -- : Error caught: [NameError] wrong constant name Cluster / Deployment Role /opt/rh/cfme-gemset/gems/activesupport-4.2.6/lib/active_support/inflector/methods.rb:261:in `const_get' /opt/rh/cfme-gemset/gems/activesupport-4.2.6/lib/active_support/inflector/methods.rb:261:in `block in constantize' /opt/rh/cfme-gemset/gems/activesupport-4.2.6/lib/active_support/inflector/methods.rb:259:in `each' /opt/rh/cfme-gemset/gems/activesupport-4.2.6/lib/active_support/inflector/methods.rb:259:in `inject' /opt/rh/cfme-gemset/gems/activesupport-4.2.6/lib/active_support/inflector/methods.rb:259:in `constantize' /opt/rh/cfme-gemset/gems/activesupport-4.2.6/lib/active_support/core_ext/string/inflections.rb:66:in `constantize' /var/www/miq/vmdb/app/controllers/application_controller/automate.rb:108:in `resolve_button_simulate' /var/www/miq/vmdb/app/controllers/application_controller/automate.rb:159:in `resolve' /opt/rh/cfme-gemset/gems/actionpack-4.2.6/lib/action_controller/metal/implicit_render.rb:4:in `send_action' /opt/rh/cfme-gemset/gems/actionpack-4.2.6/lib/abstract_controller/base.rb:198:in `process_action' /opt/rh/cfme-gemset/gems/actionpack-4.2.6/lib/action_controller/metal/rendering.rb:10:in `process_action' /opt/rh/cfme-gemset/gems/actionpack-4.2.6/lib/abstract_controller/callbacks.rb:20:in `block in process_action' /opt/rh/cfme-gemset/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:117:in `call' /opt/rh/cfme-gemset/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:117:in `call' /opt/rh/cfme-gemset/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:555:in `block (2 levels) in compile' /opt/rh/cfme-gemset/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:505:in `call' /opt/rh/cfme-gemset/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:505:in `call' /opt/rh/cfme-gemset/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:92:in `__run_callbacks__' /opt/rh/cfme-gemset/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:778:in `_run_process_action_callbacks' /opt/rh/cfme-gemset/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:81:in `run_callbacks' /opt/rh/cfme-gemset/gems/actionpack-4.2.6/lib/abstract_controller/callbacks.rb:19:in `process_action' /opt/rh/cfme-gemset/gems/actionpack-4.2.6/lib/action_controller/metal/rescue.rb:29:in `process_action' /opt/rh/cfme-gemset/gems/actionpack-4.2.6/lib/action_controller/metal/instrumentation.rb:32:in `block in process_action' /opt/rh/cfme-gemset/gems/activesupport-4.2.6/lib/active_support/notifications.rb:164:in `block in instrument' /opt/rh/cfme-gemset/gems/activesupport-4.2.6/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /opt/rh/cfme-gemset/gems/activesupport-4.2.6/lib/active_support/notifications.rb:164:in `instrument' /opt/rh/cfme-gemset/gems/actionpack-4.2.6/lib/action_controller/metal/instrumentation.rb:30:in `process_action' /opt/rh/cfme-gemset/gems/actionpack-4.2.6/lib/action_controller/metal/params_wrapper.rb:250:in `process_action' /opt/rh/cfme-gemset/gems/activerecord-4.2.6/lib/active_record/railties/controller_runtime.rb:18:in `process_action' /opt/rh/cfme-gemset/gems/actionpack-4.2.6/lib/abstract_controller/base.rb:137:in `process' /opt/rh/cfme-gemset/gems/actionview-4.2.6/lib/action_view/rendering.rb:30:in `process' /opt/rh/cfme-gemset/gems/actionpack-4.2.6/lib/action_controller/metal.rb:196:in `dispatch' /opt/rh/cfme-gemset/gems/actionpack-4.2.6/lib/action_controller/metal/rack_delegation.rb:13:in `dispatch' /opt/rh/cfme-gemset/gems/actionpack-4.2.6/lib/action_controller/metal.rb:237:in `block in action' /opt/rh/cfme-gemset/gems/actionpack-4.2.6/lib/action_dispatch/routing/route_set.rb:74:in `call' /opt/rh/cfme-gemset/gems/actionpack-4.2.6/lib/action_dispatch/routing/route_set.rb:74:in `dispatch' /opt/rh/cfme-gemset/gems/actionpack-4.2.6/lib/action_dispatch/routing/route_set.rb:43:in `serve' /opt/rh/cfme-gemset/gems/actionpack-4.2.6/lib/action_dispatch/journey/router.rb:43:in `block in serve' /opt/rh/cfme-gemset/gems/actionpack-4.2.6/lib/action_dispatch/journey/router.rb:30:in `each' /opt/rh/cfme-gemset/gems/actionpack-4.2.6/lib/action_dispatch/journey/router.rb:30:in `serve' /opt/rh/cfme-gemset/gems/actionpack-4.2.6/lib/action_dispatch/routing/route_set.rb:817:in `call' /opt/rh/cfme-gemset/gems/rack-1.6.4/lib/rack/etag.rb:24:in `call' /opt/rh/cfme-gemset/gems/rack-1.6.4/lib/rack/conditionalget.rb:38:in `call' /opt/rh/cfme-gemset/gems/rack-1.6.4/lib/rack/head.rb:13:in `call' /opt/rh/cfme-gemset/gems/actionpack-4.2.6/lib/action_dispatch/middleware/params_parser.rb:27:in `call' /opt/rh/cfme-gemset/gems/actionpack-4.2.6/lib/action_dispatch/middleware/flash.rb:260:in `call' /opt/rh/cfme-gemset/gems/rack-1.6.4/lib/rack/session/abstract/id.rb:225:in `context' /opt/rh/cfme-gemset/gems/rack-1.6.4/lib/rack/session/abstract/id.rb:220:in `call' /opt/rh/cfme-gemset/gems/actionpack-4.2.6/lib/action_dispatch/middleware/cookies.rb:560:in `call' /opt/rh/cfme-gemset/gems/activerecord-4.2.6/lib/active_record/query_cache.rb:36:in `call' /opt/rh/cfme-gemset/gems/activerecord-4.2.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:653:in `call' /opt/rh/cfme-gemset/gems/actionpack-4.2.6/lib/action_dispatch/middleware/callbacks.rb:29:in `block in call' /opt/rh/cfme-gemset/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:88:in `__run_callbacks__' /opt/rh/cfme-gemset/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:778:in `_run_call_callbacks' /opt/rh/cfme-gemset/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:81:in `run_callbacks' /opt/rh/cfme-gemset/gems/actionpack-4.2.6/lib/action_dispatch/middleware/callbacks.rb:27:in `call' /opt/rh/cfme-gemset/gems/actionpack-4.2.6/lib/action_dispatch/middleware/remote_ip.rb:78:in `call' /opt/rh/cfme-gemset/gems/actionpack-4.2.6/lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call' /opt/rh/cfme-gemset/gems/actionpack-4.2.6/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call' /opt/rh/cfme-gemset/gems/railties-4.2.6/lib/rails/rack/logger.rb:38:in `call_app' /opt/rh/cfme-gemset/gems/railties-4.2.6/lib/rails/rack/logger.rb:22:in `call' /opt/rh/cfme-gemset/gems/actionpack-4.2.6/lib/action_dispatch/middleware/request_id.rb:21:in `call' /opt/rh/cfme-gemset/gems/rack-1.6.4/lib/rack/methodoverride.rb:22:in `call' /opt/rh/cfme-gemset/gems/rack-1.6.4/lib/rack/runtime.rb:18:in `call' /opt/rh/cfme-gemset/gems/activesupport-4.2.6/lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call' /opt/rh/cfme-gemset/gems/rack-1.6.4/lib/rack/lock.rb:17:in `call' /opt/rh/cfme-gemset/gems/actionpack-4.2.6/lib/action_dispatch/middleware/static.rb:120:in `call' /opt/rh/cfme-gemset/gems/actionpack-4.2.6/lib/action_dispatch/middleware/static.rb:120:in `call' /opt/rh/cfme-gemset/gems/rack-1.6.4/lib/rack/sendfile.rb:113:in `call' /opt/rh/cfme-gemset/gems/railties-4.2.6/lib/rails/engine.rb:518:in `call' /opt/rh/cfme-gemset/gems/railties-4.2.6/lib/rails/application.rb:165:in `call' /opt/rh/cfme-gemset/gems/rack-1.6.4/lib/rack/content_length.rb:15:in `call' /opt/rh/rh-ruby22/root/usr/share/gems/gems/thin-1.6.3/lib/thin/connection.rb:86:in `block in pre_process' /opt/rh/rh-ruby22/root/usr/share/gems/gems/thin-1.6.3/lib/thin/connection.rb:84:in `catch' /opt/rh/rh-ruby22/root/usr/share/gems/gems/thin-1.6.3/lib/thin/connection.rb:84:in `pre_process' /opt/rh/rh-ruby22/root/usr/share/gems/gems/thin-1.6.3/lib/thin/connection.rb:53:in `process' /opt/rh/rh-ruby22/root/usr/share/gems/gems/thin-1.6.3/lib/thin/connection.rb:39:in `receive_data' /opt/rh/rh-ruby22/root/usr/share/gems/gems/eventmachine-1.0.7/lib/eventmachine.rb:187:in `run_machine' /opt/rh/rh-ruby22/root/usr/share/gems/gems/eventmachine-1.0.7/lib/eventmachine.rb:187:in `run' /opt/rh/rh-ruby22/root/usr/share/gems/gems/thin-1.6.3/lib/thin/backends/base.rb:73:in `start' /opt/rh/rh-ruby22/root/usr/share/gems/gems/thin-1.6.3/lib/thin/server.rb:162:in `start' /opt/rh/cfme-gemset/gems/rack-1.6.4/lib/rack/handler/thin.rb:19:in `run' /opt/rh/cfme-gemset/gems/rack-1.6.4/lib/rack/server.rb:286:in `start' /opt/rh/cfme-gemset/gems/railties-4.2.6/lib/rails/commands/server.rb:80:in `start' /opt/rh/cfme-gemset/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:80:in `block in server' /opt/rh/cfme-gemset/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:75:in `tap' /opt/rh/cfme-gemset/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:75:in `server' /opt/rh/cfme-gemset/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:39:in `run_command!' /opt/rh/cfme-gemset/gems/railties-4.2.6/lib/rails/commands.rb:17:in `<top (required)>' /var/www/miq/vmdb/bin/rails:4:in `require' /var/www/miq/vmdb/bin/rails:4:in `<main>' [----] I, [2016-07-05T03:22:20.298390 #3030:12bb988] INFO -- : Rendered layouts/_exception_contents.html.haml (0.5ms) [----] I, [2016-07-05T03:22:20.299540 #3030:12bb988] INFO -- : Completed 200 OK in 59ms (Views: 2.8ms | ActiveRecord: 3.9ms)
Created attachment 1176279 [details] error
https://github.com/ManageIQ/manageiq/pull/9665
New commit detected on ManageIQ/manageiq/master: https://github.com/ManageIQ/manageiq/commit/dac3f533c141fd2511316936a693c72d3027d51d commit dac3f533c141fd2511316936a693c72d3027d51d Author: Harpreet Kataria <hkataria> AuthorDate: Thu Jul 7 13:20:38 2016 -0400 Commit: Harpreet Kataria <hkataria> CommitDate: Thu Jul 7 17:26:53 2016 -0400 Fixed code that sets target_class to fetch records for drop down - Fixed code that sets target_class to fetch records for drop down, target_class was incorrectly being set to "Host / Node" which led to failure while trying to do target_class.constantize - Also fixed code to set @resolve[:new][:target_class] correctly to display value of Type field correctly in Object Attributes box on Assigned custom button summary screen, this broke with changes to show "Host /Node" & "Cluster / Deployment Role" for EmsCluster/Host CIs. Worked fine for other CIs - Adjusted existing spec test and added a new spec test to verify fix. https://bugzilla.redhat.com/show_bug.cgi?id=1352818 app/controllers/application_controller/automate.rb | 2 +- .../custom_buttons.rb | 10 +--------- .../application_controller/automate_spec.rb | 20 ++++++++++++++------ .../custom_buttons_spec.rb | 4 ++-- 4 files changed, 18 insertions(+), 18 deletions(-)
The bug has been fixed. Verified in version 5.7.0.3.20160927165516_075d0f3