Created attachment 1012911 [details] err Description of problem: Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. Create a catalog item and then a bundle 2. Select the above created catalog item in resources in bundle and save 3. Edit catalog item Actual results: Expected results: Additional info: [----] I, [2015-04-09T22:38:59.860119 #20006:4dde9c] INFO -- : Started POST "/catalog/x_button/51?pressed=catalogitem_edit" for 127.0.0.1 at 2015-04-09 22:38:59 -0400 [----] I, [2015-04-09T22:38:59.869134 #20006:4dde9c] INFO -- : Processing by CatalogController#x_button as JS [----] I, [2015-04-09T22:38:59.869260 #20006:4dde9c] INFO -- : Parameters: {"utf8"=>"✓", "authenticity_token"=>"tU801tkUHUbzwwxEkirXodV01p/f18CJ5jwav3sX4LI=", "pressed"=>"catalogitem_edit", "id"=>"51"} [----] F, [2015-04-09T22:38:59.966280 #20006:4dde9c] FATAL -- : Error caught: [NoMethodError] undefined method `get_dialog_order' for #<String:0x0000001811a680> /var/www/miq/vmdb/app/controllers/application_controller/miq_request_methods.rb:798:in `prov_set_form_vars' /var/www/miq/vmdb/app/controllers/catalog_controller.rb:100:in `atomic_st_edit' /var/www/miq/vmdb/app/controllers/catalog_controller.rb:66:in `servicetemplate_edit' /var/www/miq/vmdb/app/controllers/catalog_controller.rb:53:in `x_button' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_controller/metal/implicit_render.rb:4:in `send_action' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/abstract_controller/base.rb:167:in `process_action' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_controller/metal/rendering.rb:10:in `process_action' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/abstract_controller/callbacks.rb:18:in `block in process_action' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/activesupport/lib/active_support/callbacks.rb:557:in `_run__3818400436638740449__process_action__4424455780550025152__callbacks' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/activesupport/lib/active_support/callbacks.rb:405:in `__run_callback' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/activesupport/lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/activesupport/lib/active_support/callbacks.rb:81:in `run_callbacks' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/abstract_controller/callbacks.rb:17:in `process_action' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_controller/metal/rescue.rb:29:in `process_action' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_controller/metal/instrumentation.rb:30:in `block in process_action' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/activesupport/lib/active_support/notifications.rb:123:in `block in instrument' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/activesupport/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/activesupport/lib/active_support/notifications.rb:123:in `instrument' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_controller/metal/instrumentation.rb:29:in `process_action' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_controller/metal/params_wrapper.rb:207:in `process_action' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/activerecord/lib/active_record/railties/controller_runtime.rb:18:in `process_action' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/abstract_controller/base.rb:121:in `process' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/abstract_controller/rendering.rb:45:in `process' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_controller/metal.rb:203:in `dispatch' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_controller/metal/rack_delegation.rb:14:in `dispatch' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_controller/metal.rb:246:in `block in action' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_dispatch/routing/route_set.rb:73:in `call' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_dispatch/routing/route_set.rb:73:in `dispatch' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/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-8f014fba21f9/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-8f014fba21f9/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-8f014fba21f9/actionpack/lib/action_dispatch/middleware/head.rb:14:in `call' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_dispatch/middleware/params_parser.rb:21:in `call' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/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-8f014fba21f9/actionpack/lib/action_dispatch/middleware/cookies.rb:341:in `call' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/activerecord/lib/active_record/query_cache.rb:64:in `call' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:479:in `call' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_dispatch/middleware/callbacks.rb:28:in `block in call' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/activesupport/lib/active_support/callbacks.rb:405:in `_run__2829003106025436801__call__2484983069970284125__callbacks' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/activesupport/lib/active_support/callbacks.rb:405:in `__run_callback' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/activesupport/lib/active_support/callbacks.rb:385:in `_run_call_callbacks' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/activesupport/lib/active_support/callbacks.rb:81:in `run_callbacks' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_dispatch/middleware/callbacks.rb:27:in `call' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_dispatch/middleware/remote_ip.rb:31:in `call' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/actionpack/lib/action_dispatch/middleware/show_exceptions.rb:56:in `call' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/railties/lib/rails/rack/logger.rb:32:in `call_app' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/railties/lib/rails/rack/logger.rb:18:in `call' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/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-8f014fba21f9/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-8f014fba21f9/actionpack/lib/action_dispatch/middleware/static.rb:63:in `call' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/railties/lib/rails/engine.rb:484:in `call' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/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-8f014fba21f9/railties/lib/rails/rack/log_tailer.rb:17:in `call' /opt/rh/cfme-gemset/gems/thin-1.3.1/lib/thin/connection.rb:80:in `block in pre_process' /opt/rh/cfme-gemset/gems/thin-1.3.1/lib/thin/connection.rb:78:in `catch' /opt/rh/cfme-gemset/gems/thin-1.3.1/lib/thin/connection.rb:78:in `pre_process' /opt/rh/cfme-gemset/gems/thin-1.3.1/lib/thin/connection.rb:53:in `process' /opt/rh/cfme-gemset/gems/thin-1.3.1/lib/thin/connection.rb:38:in `receive_data' /opt/rh/cfme-gemset/gems/eventmachine-1.0.7/lib/eventmachine.rb:187:in `run_machine' /opt/rh/cfme-gemset/gems/eventmachine-1.0.7/lib/eventmachine.rb:187:in `run' /opt/rh/cfme-gemset/gems/thin-1.3.1/lib/thin/backends/base.rb:61:in `start' /opt/rh/cfme-gemset/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-8f014fba21f9/railties/lib/rails/commands/server.rb:70:in `start' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/railties/lib/rails/commands.rb:55:in `block in <top (required)>' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/railties/lib/rails/commands.rb:50:in `tap' /opt/rh/cfme-gemset/bundler/gems/rails-8f014fba21f9/railties/lib/rails/commands.rb:50:in `<top (required)>' script/rails:6:in `require' script/rails:6:in `<main>'
Created attachment 1012912 [details] orphaned template Also , if you select that item and select "request Info " it shows , template is orphaned so cannot show data . But actually the template is not orphaned.
Ok found the problem , error occurs if we try to edit the catalog item when no provider is added . So add a provider , create a catalog item , delete provider , edit catalog item -- Error .
Lucy, in miq_provision_virt_workflow.rb we raise errors under several conditions which break the UI from loading the workflow. It would be better to move these checks into a different workflow method that would allow the UI check if the workflow is valid and also allow for it to be loaded so issues could be corrected. This approach would require UI changes to make an extra call to validate and mark a service as bad so we should discuss basic design with them.
In Comment #4 I meant to say that the UI could mark the catalog item (not service) as bad.
New commit detected on manageiq/master: https://github.com/ManageIQ/manageiq/commit/f4c68546114344fcaa363d06629b1c99034b7bb8 commit f4c68546114344fcaa363d06629b1c99034b7bb8 Author: Lucy Fu <lufu> AuthorDate: Tue May 26 13:33:59 2015 -0400 Commit: Lucy Fu <lufu> CommitDate: Mon Jun 8 15:07:22 2015 -0400 Check the object's existence before calling method upon it. https://bugzilla.redhat.com/show_bug.cgi?id=1210541 vmdb/app/models/miq_provision_redhat_workflow.rb | 4 +++- vmdb/app/models/miq_provision_virt_workflow.rb | 8 +++----- vmdb/app/models/miq_request_workflow.rb | 6 +++++- 3 files changed, 11 insertions(+), 7 deletions(-)
New commit detected on manageiq/master: https://github.com/ManageIQ/manageiq/commit/0d70c2ec354b7035a3289d33b97aa7a07fab2bcb commit 0d70c2ec354b7035a3289d33b97aa7a07fab2bcb Author: Lucy Fu <lufu> AuthorDate: Tue May 26 13:35:42 2015 -0400 Commit: Lucy Fu <lufu> CommitDate: Mon Jun 8 15:07:22 2015 -0400 Update the provision request's source field with the new template when editing. https://bugzilla.redhat.com/show_bug.cgi?id=1210541 vmdb/app/models/miq_provision_workflow.rb | 6 ++++++ 1 file changed, 6 insertions(+)
New commit detected on manageiq/master: https://github.com/ManageIQ/manageiq/commit/8e79ba8af753e3234710043d99cd5dae7b27ead9 commit 8e79ba8af753e3234710043d99cd5dae7b27ead9 Author: Lucy Fu <lufu> AuthorDate: Tue May 26 13:37:53 2015 -0400 Commit: Lucy Fu <lufu> CommitDate: Mon Jun 8 15:07:23 2015 -0400 Move the logic to validate the template into a separate method source_valid? https://bugzilla.redhat.com/show_bug.cgi?id=1210541 vmdb/app/models/miq_provision_virt_workflow.rb | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-)
New commit detected on manageiq/master: https://github.com/ManageIQ/manageiq/commit/e4de97d34ca29f13b65d7c8654e2e403ab09f48c commit e4de97d34ca29f13b65d7c8654e2e403ab09f48c Author: Lucy Fu <lufu> AuthorDate: Tue May 26 13:41:48 2015 -0400 Commit: Lucy Fu <lufu> CommitDate: Mon Jun 8 15:07:23 2015 -0400 Fix some minor issues in miq_request_methods.rb. https://bugzilla.redhat.com/show_bug.cgi?id=1210541 .../controllers/application_controller/miq_request_methods.rb | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)
New commit detected on manageiq/master: https://github.com/ManageIQ/manageiq/commit/336870d19fad3429499b181a337691204c4c3c67 commit 336870d19fad3429499b181a337691204c4c3c67 Author: Lucy Fu <lufu> AuthorDate: Tue May 26 13:45:14 2015 -0400 Commit: Lucy Fu <lufu> CommitDate: Mon Jun 8 15:07:23 2015 -0400 prov_type is stored in @edit[:st_prov_type] when creating a catalog item. but is stored in @edit[:new][:st_prov_type] when editing a catalog item. https://bugzilla.redhat.com/show_bug.cgi?id=1210541 vmdb/app/controllers/application_controller/miq_request_methods.rb | 2 ++ 1 file changed, 2 insertions(+)
New commit detected on manageiq/master: https://github.com/ManageIQ/manageiq/commit/e57515180bffe2901f69c6794790eac943ae9de4 commit e57515180bffe2901f69c6794790eac943ae9de4 Author: Lucy Fu <lufu> AuthorDate: Mon Jun 1 11:13:44 2015 -0400 Commit: Lucy Fu <lufu> CommitDate: Mon Jun 8 15:07:23 2015 -0400 Fix the failed test cases due to the change here: https://github.com/lfu/manageiq/blob/c73d33aaa74c592c5d29c554231d464e435b8139/vmdb/app/models/miq_request_workflow.rb#L818 https://bugzilla.redhat.com/show_bug.cgi?id=1210541 vmdb/spec/models/miq_provision_amazon_workflow_spec.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
New commit detected on manageiq/master: https://github.com/ManageIQ/manageiq/commit/505a2b5753aeb3a607d8820ccb02e7ff74eb9488 commit 505a2b5753aeb3a607d8820ccb02e7ff74eb9488 Author: Lucy Fu <lufu> AuthorDate: Tue May 26 13:48:46 2015 -0400 Commit: Lucy Fu <lufu> CommitDate: Mon Jun 8 15:07:23 2015 -0400 Check the existence of the src_vm object instead of its id so it does not fail with a missing template. https://bugzilla.redhat.com/show_bug.cgi?id=1210541 vmdb/app/controllers/application_controller/miq_request_methods.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
Test automated in https://github.com/RedHatQE/cfme_tests/pull/2092
https://github.com/ManageIQ/manageiq/pull/4415
https://github.com/ManageIQ/manageiq/pull/9680
New commit detected on ManageIQ/manageiq/master: https://github.com/ManageIQ/manageiq/commit/ac0f97ba34517b5f7eab75d108bdd5e04005112f commit ac0f97ba34517b5f7eab75d108bdd5e04005112f Author: Laura Galis <lgalis> AuthorDate: Fri Jul 8 09:20:43 2016 -0400 Commit: Laura Galis <lgalis> CommitDate: Sun Jul 10 16:38:01 2016 -0400 Handle a deleted provider for an existing catalog item edit https://bugzilla.redhat.com/show_bug.cgi?id=1210541 app/models/miq_request_workflow.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
New commit detected on cfme/5.5.z: https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=3189ff5f862abf4ab14b924efb6bfb2b8da15348 commit 3189ff5f862abf4ab14b924efb6bfb2b8da15348 Author: Laura Galis <lgalis> AuthorDate: Fri Jul 8 09:20:43 2016 -0400 Commit: Laura Galis <lgalis> CommitDate: Mon Jul 11 12:19:38 2016 -0400 Handle a deleted provider for an existing catalog item edit https://bugzilla.redhat.com/show_bug.cgi?id=1210541 (cherry picked from commit ac0f97b) app/models/miq_request_workflow.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
*** Bug 1349263 has been marked as a duplicate of this bug. ***
Fixed. Verified in 5.7.0.0.20160906172503_12f65cb