Bug 1263326

Summary: Clicking on "Migrate selected items" under lifecycle dropdown routes to wrong config screen
Product: Red Hat CloudForms Management Engine Reporter: Prasad Mukhedkar <pmukhedk>
Component: UI - OPSAssignee: Harpreet Kataria <hkataria>
Status: CLOSED ERRATA QA Contact: Kyrylo Zvyagintsev <kzvyahin>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.4.0CC: akarol, hkataria, jhardy, mfeifer, mpovolny, obarenbo, ssainkar
Target Milestone: GA   
Target Release: 5.5.0   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: 5.5.0.3 Doc Type: Bug Fix
Doc Text:
Previously, clicking on "Migrate Selected Items" under lifecycle dropdown routed to an incorrect config screen. The caller method did not render flash message for sublist screens. This patch fixes respective 'button' methods to render flash message partially when tasks (clone, migrate, publish) are not supported for selected items. This is when user tries to perform these tasks from a list view of VMs through relationships. Thereby, the correct screen displays and the issue is now resolved.
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-12-08 13:30:28 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: 1259790    

Description Prasad Mukhedkar 2015-09-15 14:37:06 UTC
Description of problem:


When migrating  vm or VMs from a list view (or more), then checking the checkbox of the vm and then lifecycle\migrate. This brings up a different screen then going into the full detail view of the vm then clicking lifecycle\migrate. 

Infra/ Provider/ Relationships / VMs  > lifecycle\"Migrate Selected Items"
routes to "Infrastructure Providers  Requests" screen instead of "Migrate Virtual Machine" Dialog box. 



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

How reproducible:
Always

Steps to Reproduce:
1. Nevigate Infrastructure / Provider/ Relationships / VMs  
2. Select few virtual machines and click on lifecycle\"Migrate Selected Items"


Actual results:
Redirect to "Infrastructure Providers  Requests" screen

Expected results:
Should redirect to "Migrate Virtual Machine" Dialog box

Additional info:
workaround, You can go directly to the infra/ vm's & template page to perform the migration

Comment 9 Aparna Karve 2015-09-16 20:35:24 UTC
*** Bug 1258408 has been marked as a duplicate of this bug. ***

Comment 12 CFME Bot 2015-09-28 15:00:22 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/a757660126d3ec9085e8bb1479b1b2fbdb6509bb

commit a757660126d3ec9085e8bb1479b1b2fbdb6509bb
Author:     Harpreet Kataria <hkataria>
AuthorDate: Tue Sep 15 17:22:36 2015 -0400
Commit:     Harpreet Kataria <hkataria>
CommitDate: Wed Sep 23 15:06:11 2015 -0400

    let caller method render flash message for sublist screens.
    
    - Fixed respective 'button' methods to render flash message partial when task(clone,migrate,publish) are not supported for selected items when user trees to perform these tasks from list of VMs thru relationships. render_flash_not_applicable_to_model will only render flash message when performing tasks directly from VM explorers.
    - Added spec test to verify fix.
    - Moved common code in controllers into a single method.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1263326

 app/controllers/application_controller.rb         | 39 +++++++++++++++++++++--
 app/controllers/availability_zone_controller.rb   | 16 +---------
 app/controllers/cim_instance_controller.rb        | 16 +---------
 app/controllers/cloud_tenant_controller.rb        | 20 +-----------
 app/controllers/ems_cluster_controller.rb         | 16 +---------
 app/controllers/ems_common.rb                     | 22 +------------
 app/controllers/flavor_controller.rb              | 16 +---------
 app/controllers/host_controller.rb                | 12 ++++++-
 app/controllers/orchestration_stack_controller.rb | 20 +-----------
 app/controllers/repository_controller.rb          | 16 +---------
 app/controllers/resource_pool_controller.rb       | 32 ++++++-------------
 app/controllers/security_group_controller.rb      | 16 +---------
 app/controllers/storage_controller.rb             | 16 +---------
 spec/controllers/application_controller_spec.rb   |  1 -
 spec/controllers/ems_common_controller_spec.rb    | 30 +++++++++++++++++
 15 files changed, 97 insertions(+), 191 deletions(-)

Comment 13 CFME Bot 2015-09-28 16:33:39 UTC
New commit detected on cfme/5.4.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=2d8e2e992e699c0c14f3358daa6ba979ce412485

commit 2d8e2e992e699c0c14f3358daa6ba979ce412485
Author:     Harpreet Kataria <hkataria>
AuthorDate: Mon Sep 28 11:20:38 2015 -0400
Commit:     Harpreet Kataria <hkataria>
CommitDate: Mon Sep 28 11:32:30 2015 -0400

    let caller method render flash message for sublist screens.
    
    - Fixed respective 'button' methods to render flash message partial when task(clone,migrate,publish) are not supported for selected items when user trees to perform these tasks from list of VMs thru relationships. render_flash_not_applicable_to_model will only render flash message when performing tasks directly from VM explorers.
    - Added spec test to verify fix.
    - Moved common code in controllers into a single method.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1263326
    https://bugzilla.redhat.com/show_bug.cgi?id=1259790

 vmdb/app/controllers/application_controller.rb     | 39 ++++++++++++++++++++--
 .../controllers/availability_zone_controller.rb    | 16 +--------
 vmdb/app/controllers/cim_instance_controller.rb    | 16 +--------
 vmdb/app/controllers/cloud_tenant_controller.rb    | 20 +----------
 vmdb/app/controllers/ems_cluster_controller.rb     | 16 +--------
 vmdb/app/controllers/ems_common.rb                 | 16 +--------
 vmdb/app/controllers/flavor_controller.rb          | 16 +--------
 vmdb/app/controllers/host_controller.rb            | 12 ++++++-
 .../controllers/orchestration_stack_controller.rb  | 20 +----------
 vmdb/app/controllers/repository_controller.rb      | 16 +--------
 vmdb/app/controllers/resource_pool_controller.rb   | 32 +++++-------------
 vmdb/app/controllers/security_group_controller.rb  | 16 +--------
 vmdb/app/controllers/storage_controller.rb         | 16 +--------
 .../controllers/application_controller_spec.rb     |  1 -
 .../spec/controllers/ems_common_controller_spec.rb | 30 +++++++++++++++++
 15 files changed, 97 insertions(+), 185 deletions(-)

Comment 14 CFME Bot 2015-09-28 16:33:48 UTC
New commit detected on cfme/5.4.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=8c6a6f47fdfceb3a19b7fec80a6117dd003b1ce5

commit 8c6a6f47fdfceb3a19b7fec80a6117dd003b1ce5
Merge: a69c2fd 2d8e2e9
Author:     Dan Clarizio <dclarizi>
AuthorDate: Mon Sep 28 12:25:40 2015 -0400
Commit:     Dan Clarizio <dclarizi>
CommitDate: Mon Sep 28 12:25:40 2015 -0400

    Merge branch '54z_bz_1259790' into '5.4.z'
    
    let caller method render flash message for sublist screens.
    
    - Fixed respective 'button' methods to render flash message partial when task(clone,migrate,publish) are not supported for selected items when user trees to perform these tasks from list of VMs thru relationships. render_flash_not_applicable_to_model will only render flash message when performing tasks directly from VM explorers.
    - Added spec test to verify fix.
    - Moved common code in controllers into a single method.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1263326
    https://bugzilla.redhat.com/show_bug.cgi?id=1259790
    
    @dclarizi please review, a clean patch was applied. Original PR: https://github.com/ManageIQ/manageiq/pull/4368
    
    See merge request !270

 vmdb/app/controllers/application_controller.rb     | 39 ++++++++++++++++++++--
 .../controllers/availability_zone_controller.rb    | 16 +--------
 vmdb/app/controllers/cim_instance_controller.rb    | 16 +--------
 vmdb/app/controllers/cloud_tenant_controller.rb    | 20 +----------
 vmdb/app/controllers/ems_cluster_controller.rb     | 16 +--------
 vmdb/app/controllers/ems_common.rb                 | 16 +--------
 vmdb/app/controllers/flavor_controller.rb          | 16 +--------
 vmdb/app/controllers/host_controller.rb            | 12 ++++++-
 .../controllers/orchestration_stack_controller.rb  | 20 +----------
 vmdb/app/controllers/repository_controller.rb      | 16 +--------
 vmdb/app/controllers/resource_pool_controller.rb   | 32 +++++-------------
 vmdb/app/controllers/security_group_controller.rb  | 16 +--------
 vmdb/app/controllers/storage_controller.rb         | 16 +--------
 .../controllers/application_controller_spec.rb     |  1 -
 .../spec/controllers/ems_common_controller_spec.rb | 30 +++++++++++++++++
 15 files changed, 97 insertions(+), 185 deletions(-)

Comment 17 errata-xmlrpc 2015-12-08 13:30:28 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