Bug 1731735

Summary: Tenant dashboard view displays all cloud items of all projects
Product: Red Hat CloudForms Management Engine Reporter: Ido Ovadia <iovadia>
Component: ProvidersAssignee: Marek Aufart <maufart>
Status: CLOSED CURRENTRELEASE QA Contact: Ido Ovadia <iovadia>
Severity: medium Docs Contact: Red Hat CloudForms Documentation <cloudforms-docs>
Priority: medium    
Version: 5.11.0CC: jfrey, jhardy, maufart, mshriver, obarenbo, simaishi
Target Milestone: GA   
Target Release: 5.11.0   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: 5.11.0.21 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-12-13 14:58:02 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: Bug
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: Openstack Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1487178    

Description Ido Ovadia 2019-07-21 12:08:14 UTC
Description of problem:
=======================
Tenant dashboard view displays all cloud items of all projects

Version-Release number of selected component:
=============================================
5.11.0.14

How reproducible:
=================
100%

Steps to Reproduce:
===================
1. Add OSP as cloud provider with admin credentials, tenant mapping enabled
2. Create two projects A and B 
3. Create cloud items on project B only, such as network, volume,instance etc.
4. Browse: Compute --> Clouds --> Tenants
5. Click project A
6. Click Dashboard View 
 
Actual results:
===============
Dashboard view accounts all cloud items of all projects

Expected results:
=================
Dashboard view accounts all cloud items only from selected project

Additional info:
================
Summary view accounts correctly only items from selected project

Comment 2 CFME Bot 2019-08-16 13:32:04 UTC
New commits detected on ManageIQ/manageiq-ui-classic/master:

https://github.com/ManageIQ/manageiq-ui-classic/commit/64404977f50eb19ac57cec7cc07388d2e5430cbb
commit 64404977f50eb19ac57cec7cc07388d2e5430cbb
Author:     Harpreet Kataria <hkataria>
AuthorDate: Mon Aug 12 14:50:18 2019 -0400
Commit:     Harpreet Kataria <hkataria>
CommitDate: Mon Aug 12 14:50:18 2019 -0400

    Fixed correct setting of record to get counts of relationships

    - Fixed to CloudTenantService to not inherit from EmsDashboardService, instead inherit from DashboardService and have it's own methods so correct data can be fetched using CloudTenant record.

    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1731735
    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1487178

 app/controllers/cloud_tenant_dashboard_controller.rb | 8 +-
 app/services/cloud_tenant_dashboard_service.rb | 74 +-
 app/services/dashboard_service.rb | 21 +
 3 files changed, 92 insertions(+), 11 deletions(-)


https://github.com/ManageIQ/manageiq-ui-classic/commit/1371c00344b900683931e89fe1e08f0b7e7a90f2
commit 1371c00344b900683931e89fe1e08f0b7e7a90f2
Author:     Harpreet Kataria <hkataria>
AuthorDate: Wed Aug 14 10:32:55 2019 -0400
Commit:     Harpreet Kataria <hkataria>
CommitDate: Wed Aug 14 10:32:55 2019 -0400

    Fixed query that build recent records charts.

    Passing in a relation to `recent_records` to get recent vms/templates for the selected CloudTenant record

    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1731735
    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1487178

 app/services/cloud_tenant_dashboard_service.rb | 17 +-
 1 file changed, 8 insertions(+), 9 deletions(-)

Comment 3 Libor Pichler 2019-08-16 13:57:17 UTC
*** Bug 1705965 has been marked as a duplicate of this bug. ***

Comment 4 CFME Bot 2019-08-16 20:47:13 UTC
New commit detected on ManageIQ/manageiq-ui-classic/ivanchuk:

https://github.com/ManageIQ/manageiq-ui-classic/commit/482aa40349860fac6d8d903f8c0132beece02494
commit 482aa40349860fac6d8d903f8c0132beece02494
Author:     Martin Hradil <mhradil>
AuthorDate: Fri Aug 16 09:27:01 2019 -0400
Commit:     Martin Hradil <mhradil>
CommitDate: Fri Aug 16 09:27:01 2019 -0400

    Merge pull request #5995 from h-kataria/fixed_cloud_tenant_dashboard_view

    Fixed correct setting of record to get counts of relationships

    (cherry picked from commit 1492f6a42e723d5afce9bcd23a61ff02542a2b6e)

    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1731735
    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1487178

 app/controllers/cloud_tenant_dashboard_controller.rb | 8 +-
 app/services/cloud_tenant_dashboard_service.rb | 73 +-
 app/services/dashboard_service.rb | 21 +
 3 files changed, 91 insertions(+), 11 deletions(-)

Comment 5 Ido Ovadia 2019-09-11 08:16:50 UTC
Verified
========
5.10.0.23

Comment 6 Ido Ovadia 2019-09-11 08:18:20 UTC
(In reply to Ido Ovadia from comment #5)
> Verified
> ========
> 5.10.0.23

Sorry for the typo, it was  5.11.0.23