Bug 1229677

Summary: Dialog cannot be found. Name:[miq_provision_amazon_dialogs_template] Type:[MiqProvisionWorkflow] [catalog/atomic_form_field_changed] on selecting the catalog item type in add catalog item
Product: Red Hat CloudForms Management Engine Reporter: Aziza Karol <akarol>
Component: UI - OPSAssignee: Harpreet Kataria <hkataria>
Status: CLOSED ERRATA QA Contact: Aziza Karol <akarol>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.4.0CC: akarol, gmccullo, hkataria, jhardy, mfeifer, mpovolny, obarenbo
Target Milestone: GA   
Target Release: 5.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 5.5.0.1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1234494 (view as bug list) Environment:
Last Closed: 2015-12-08 13:17:23 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1234494    
Attachments:
Description Flags
err none

Description Aziza Karol 2015-06-09 12:09:55 UTC
Created attachment 1036725 [details]
err

Description of problem:


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

How reproducible:
100%

Steps to Reproduce:
1.Navigate to Services->Catalogs->Catalog items and click on add a new catalog items
2.select catalog item type as amazon or openstack or rhev. Error is thrown
3.

Note: For item type Generic,Orchestration,SCVMM or vmware this error is not observed

Actual results:
Dialog cannot be found. Name:[miq_provision_amazon_dialogs_template] Type:[MiqProvisionWorkflow] [catalog/atomic_form_field_changed]. see attached screenshot

Expected results:
No error

Additional info:
[----] I, [2015-06-09T07:49:32.132397 #2459:e9dea0]  INFO -- : Started POST "/catalog/x_button?pressed=atomic_catalogitem_new" for 127.0.0.1 at 2015-06-09 07:49:32 -0400
[----] I, [2015-06-09T07:49:32.138291 #2459:e9dea0]  INFO -- : Processing by CatalogController#x_button as JS
[----] I, [2015-06-09T07:49:32.138383 #2459:e9dea0]  INFO -- :   Parameters: {"pressed"=>"atomic_catalogitem_new"}
[----] I, [2015-06-09T07:49:33.010804 #2459:e9dea0]  INFO -- :   Rendered layouts/_flash_msg.html.haml (0.1ms)
[----] I, [2015-06-09T07:49:33.011462 #2459:e9dea0]  INFO -- :   Rendered catalog/_st_form.html.haml (3.8ms)
[----] I, [2015-06-09T07:49:33.023885 #2459:e9dea0]  INFO -- :   Rendered layouts/_x_edit_buttons.html.haml (9.6ms)
[----] I, [2015-06-09T07:49:33.031019 #2459:e9dea0]  INFO -- : Completed 200 OK in 892.5ms (Views: 0.1ms | ActiveRecord: 144.5ms)
[----] I, [2015-06-09T07:49:39.080952 #2459:e9dea0]  INFO -- : Started POST "/catalog/atomic_form_field_changed/new" for 127.0.0.1 at 2015-06-09 07:49:39 -0400
[----] I, [2015-06-09T07:49:39.084280 #2459:e9dea0]  INFO -- : Processing by CatalogController#atomic_form_field_changed as JS
[----] I, [2015-06-09T07:49:39.084366 #2459:e9dea0]  INFO -- :   Parameters: {"st_prov_type"=>"amazon", "id"=>"new"}
[----] F, [2015-06-09T07:49:43.180789 #2459:e9dea0] FATAL -- : Error caught: [MiqException::Error] Dialog cannot be found.  Name:[miq_provision_amazon_dialogs_template]  Type:[MiqProvisionWorkflow]
/var/www/miq/vmdb/app/models/miq_request_workflow.rb:658:in `get_dialogs'
/var/www/miq/vmdb/app/models/miq_provision_virt_workflow.rb:27:in `initialize'
/var/www/miq/vmdb/app/controllers/application_controller/miq_request_methods.rb:928:in `new'
/var/www/miq/vmdb/app/controllers/application_controller/miq_request_methods.rb:928:in `workflow_instance_from_vars'
/var/www/miq/vmdb/app/controllers/application_controller/miq_request_methods.rb:787:in `prov_set_form_vars'
/var/www/miq/vmdb/app/controllers/catalog_controller.rb:150:in `atomic_form_field_changed'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/abstract_controller/base.rb:167:in `process_action'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/action_controller/metal/rendering.rb:10:in `process_action'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/abstract_controller/callbacks.rb:18:in `block in process_action'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/activesupport/lib/active_support/callbacks.rb:568:in `_run__4603827275105568109__process_action__3329014834199512804__callbacks'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/activesupport/lib/active_support/callbacks.rb:405:in `__run_callback'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/activesupport/lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/activesupport/lib/active_support/callbacks.rb:81:in `run_callbacks'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/abstract_controller/callbacks.rb:17:in `process_action'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/action_controller/metal/rescue.rb:29:in `process_action'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/activesupport/lib/active_support/notifications.rb:123:in `block in instrument'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/activesupport/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/activesupport/lib/active_support/notifications.rb:123:in `instrument'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/action_controller/metal/instrumentation.rb:29:in `process_action'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/action_controller/metal/params_wrapper.rb:207:in `process_action'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/activerecord/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/abstract_controller/base.rb:121:in `process'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/abstract_controller/rendering.rb:45:in `process'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/action_controller/metal.rb:203:in `dispatch'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/action_controller/metal.rb:246:in `block in action'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/action_dispatch/routing/route_set.rb:73:in `call'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/action_dispatch/routing/route_set.rb:73:in `dispatch'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/action_dispatch/routing/route_set.rb:36:in `call'
/opt/rh/cfme-gemset/gems/journey-1.0.4/lib/journey/router.rb:68:in `block in call'
/opt/rh/cfme-gemset/gems/journey-1.0.4/lib/journey/router.rb:56:in `each'
/opt/rh/cfme-gemset/gems/journey-1.0.4/lib/journey/router.rb:56:in `call'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/action_dispatch/routing/route_set.rb:608:in `call'
/opt/rh/cfme-gemset/gems/rack-cache-1.2/lib/rack/cache/context.rb:136:in `forward'
/opt/rh/cfme-gemset/gems/rack-cache-1.2/lib/rack/cache/context.rb:143:in `pass'
/opt/rh/cfme-gemset/gems/rack-cache-1.2/lib/rack/cache/context.rb:155:in `invalidate'
/opt/rh/cfme-gemset/gems/rack-cache-1.2/lib/rack/cache/context.rb:71:in `call!'
/opt/rh/cfme-gemset/gems/rack-cache-1.2/lib/rack/cache/context.rb:51:in `call'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
/opt/rh/cfme-gemset/gems/rack-1.4.5/lib/rack/etag.rb:23:in `call'
/opt/rh/cfme-gemset/gems/rack-1.4.5/lib/rack/conditionalget.rb:35:in `call'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/action_dispatch/middleware/head.rb:14:in `call'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/action_dispatch/middleware/params_parser.rb:21:in `call'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/action_dispatch/middleware/flash.rb:242:in `call'
/opt/rh/cfme-gemset/gems/rack-1.4.5/lib/rack/session/abstract/id.rb:210:in `context'
/opt/rh/cfme-gemset/gems/rack-1.4.5/lib/rack/session/abstract/id.rb:205:in `call'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/action_dispatch/middleware/cookies.rb:341:in `call'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/activerecord/lib/active_record/query_cache.rb:64:in `call'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:479:in `call'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/activesupport/lib/active_support/callbacks.rb:405:in `_run__3055438731397051558__call__3512400057747199118__callbacks'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/activesupport/lib/active_support/callbacks.rb:405:in `__run_callback'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/activesupport/lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/activesupport/lib/active_support/callbacks.rb:81:in `run_callbacks'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/railties/lib/rails/rack/logger.rb:32:in `call_app'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/railties/lib/rails/rack/logger.rb:18:in `call'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/action_dispatch/middleware/request_id.rb:22:in `call'
/opt/rh/cfme-gemset/gems/rack-1.4.5/lib/rack/methodoverride.rb:21:in `call'
/opt/rh/cfme-gemset/gems/rack-1.4.5/lib/rack/runtime.rb:17:in `call'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/activesupport/lib/active_support/cache/strategy/local_cache.rb:72:in `call'
/opt/rh/cfme-gemset/gems/rack-1.4.5/lib/rack/lock.rb:15:in `call'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/action_dispatch/middleware/static.rb:63:in `call'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/railties/lib/rails/engine.rb:484:in `call'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/railties/lib/rails/application.rb:231:in `call'
/opt/rh/cfme-gemset/gems/rack-1.4.5/lib/rack/content_length.rb:14:in `call'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/railties/lib/rails/rack/log_tailer.rb:17:in `call'
/opt/rh/ruby200/root/usr/share/gems/gems/thin-1.3.1/lib/thin/connection.rb:80:in `block in pre_process'
/opt/rh/ruby200/root/usr/share/gems/gems/thin-1.3.1/lib/thin/connection.rb:78:in `catch'
/opt/rh/ruby200/root/usr/share/gems/gems/thin-1.3.1/lib/thin/connection.rb:78:in `pre_process'
/opt/rh/ruby200/root/usr/share/gems/gems/thin-1.3.1/lib/thin/connection.rb:53:in `process'
/opt/rh/ruby200/root/usr/share/gems/gems/thin-1.3.1/lib/thin/connection.rb:38:in `receive_data'
/opt/rh/ruby200/root/usr/share/gems/gems/eventmachine-1.0.7/lib/eventmachine.rb:187:in `run_machine'
/opt/rh/ruby200/root/usr/share/gems/gems/eventmachine-1.0.7/lib/eventmachine.rb:187:in `run'
/opt/rh/ruby200/root/usr/share/gems/gems/thin-1.3.1/lib/thin/backends/base.rb:61:in `start'
/opt/rh/ruby200/root/usr/share/gems/gems/thin-1.3.1/lib/thin/server.rb:159:in `start'
/opt/rh/cfme-gemset/gems/rack-1.4.5/lib/rack/handler/thin.rb:13:in `run'
/opt/rh/cfme-gemset/gems/rack-1.4.5/lib/rack/server.rb:268:in `start'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/railties/lib/rails/commands/server.rb:70:in `start'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/railties/lib/rails/commands.rb:55:in `block in <top (required)>'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/railties/lib/rails/commands.rb:50:in `tap'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/railties/lib/rails/commands.rb:50:in `<top (required)>'
script/rails:6:in `require'
script/rails:6:in `<main>'

Comment 2 Greg McCullough 2015-06-09 13:54:29 UTC
The dialog "miq_provision_amazon_dialogs_template" is shipped as a sample dialog.  Does it show in Automate -> Customization -> Provisioning Dialogs?

Comment 3 Aziza Karol 2015-06-09 16:09:55 UTC
Greg,

Yes,I deleted this sample dialog from Automate -> Customization -> Provisioning Dialogs and then was trying to add the catalog item.

As i see that this sample dialogs are not editable.so i think it should not be allowed to delete also.

~Thanks
Aziza

Comment 4 Greg McCullough 2015-06-09 17:29:44 UTC
Moving back to UI.  We do not allow a user to edit the sample dialogs (based on the default flag) but they can currently be deleted.  The dialogs get restored from disk when the appliance starts so they would get re-seeded into the db anyway.

Comment 6 CFME Bot 2015-06-11 11:40:35 UTC
New commit detected on manageiq/master:
https://github.com/ManageIQ/manageiq/commit/ac3b5fed4314df8904f780412640a482815f140e

commit ac3b5fed4314df8904f780412640a482815f140e
Author:     Harpreet Kataria <hkataria>
AuthorDate: Tue Jun 9 16:48:37 2015 -0400
Commit:     Harpreet Kataria <hkataria>
CommitDate: Wed Jun 10 12:43:46 2015 -0400

    Fixed to not allow deletion of default dialog from summary screen.
    
    Fixed to not allow deletion of default dialog from summary screen. Added spec tests to verify that default dialogs do not get deleted from summary screen or list view.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1229677

 .../miq_ae_customization_controller/old_dialogs.rb | 12 +++--
 .../old_dialogs_spec.rb                            | 59 ++++++++++++++++++++++
 2 files changed, 66 insertions(+), 5 deletions(-)
 create mode 100644 vmdb/spec/controllers/miq_ae_customization_controller/old_dialogs_spec.rb

Comment 7 CFME Bot 2015-06-11 13:36:41 UTC
New commit detected on manageiq/master:
https://github.com/ManageIQ/manageiq/commit/ac3b5fed4314df8904f780412640a482815f140e

commit ac3b5fed4314df8904f780412640a482815f140e
Author:     Harpreet Kataria <hkataria>
AuthorDate: Tue Jun 9 16:48:37 2015 -0400
Commit:     Harpreet Kataria <hkataria>
CommitDate: Wed Jun 10 12:43:46 2015 -0400

    Fixed to not allow deletion of default dialog from summary screen.
    
    Fixed to not allow deletion of default dialog from summary screen. Added spec tests to verify that default dialogs do not get deleted from summary screen or list view.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1229677

 .../miq_ae_customization_controller/old_dialogs.rb | 12 +++--
 .../old_dialogs_spec.rb                            | 59 ++++++++++++++++++++++
 2 files changed, 66 insertions(+), 5 deletions(-)
 create mode 100644 vmdb/spec/controllers/miq_ae_customization_controller/old_dialogs_spec.rb

Comment 8 CFME Bot 2015-07-14 22:06:12 UTC
New commit detected on cfme/5.4.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=e2f46d9b967eb1be9116bcfde8ab294c7c50b6df

commit e2f46d9b967eb1be9116bcfde8ab294c7c50b6df
Author:     Harpreet Kataria <hkataria>
AuthorDate: Tue Jun 9 16:48:37 2015 -0400
Commit:     Harpreet Kataria <hkataria>
CommitDate: Mon Jun 22 12:15:14 2015 -0400

    Fixed to not allow deletion of default dialog from summary screen.
    
    Fixed to not allow deletion of default dialog from summary screen. Added spec tests to verify that default dialogs do not get deleted from summary screen or list view.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1229677
    (cherry picked from commit ac3b5fe)
    https://bugzilla.redhat.com/show_bug.cgi?id=1234494

 .../miq_ae_customization_controller/old_dialogs.rb | 12 +++--
 .../old_dialogs_spec.rb                            | 59 ++++++++++++++++++++++
 2 files changed, 66 insertions(+), 5 deletions(-)
 create mode 100644 vmdb/spec/controllers/miq_ae_customization_controller/old_dialogs_spec.rb

Comment 9 CFME Bot 2015-07-14 22:06:32 UTC
New commit detected on cfme/5.4.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=be4966e008b5820263fd76bf3500cb7a94e7ba40

commit be4966e008b5820263fd76bf3500cb7a94e7ba40
Merge: fc4f6de e2f46d9
Author:     Dan Clarizio <dclarizi>
AuthorDate: Tue Jul 14 18:02:59 2015 -0400
Commit:     Dan Clarizio <dclarizi>
CommitDate: Tue Jul 14 18:02:59 2015 -0400

    Merge branch '54z_bz_1234494' into '5.4.z'
    
    Fixed to not allow deletion of default dialog from summary screen.
    
    Fixed to not allow deletion of default dialog from summary screen. Added spec tests to verify that default dialogs do not get deleted from summary screen or list view.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1229677
    (cherry picked from commit ac3b5fe)
    https://bugzilla.redhat.com/show_bug.cgi?id=1234494
    
    PR: https://github.com/ManageIQ/manageiq/pull/3107
    @dclarizio please review, this is a clean cherry-pick
    
    See merge request !138

 .../miq_ae_customization_controller/old_dialogs.rb | 12 +++--
 .../old_dialogs_spec.rb                            | 59 ++++++++++++++++++++++
 2 files changed, 66 insertions(+), 5 deletions(-)

Comment 10 Aziza Karol 2015-09-22 06:11:47 UTC
Deletion of default dialog from summary screen is not allowed.

Verified in 5.5.0.1-alpha1.20150915151429_2230bd4.

Comment 12 errata-xmlrpc 2015-12-08 13:17:23 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://access.redhat.com/errata/RHSA-2015:2551