Bug 1761430 - Report data view table sorting does not work as expected
Summary: Report data view table sorting does not work as expected
Keywords:
Status: POST
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Reporting
Version: 5.11.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: GA
: 5.11.z
Assignee: Gregg Tanzillo
QA Contact: Sudhir Mallamprabhakara
Red Hat CloudForms Documentation
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-10-14 11:46 UTC by Parthvi Vala
Modified: 2023-06-30 18:57 UTC (History)
0 users

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Category: Bug
Cloudforms Team: CFME Core
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Report sorted in ascending order (142.17 KB, image/png)
2019-10-14 11:46 UTC, Parthvi Vala
no flags Details
Report sorted in descending order (137.66 KB, image/png)
2019-10-14 11:47 UTC, Parthvi Vala
no flags Details

Description Parthvi Vala 2019-10-14 11:46:39 UTC
Created attachment 1625586 [details]
Report sorted in ascending order

Description of problem:
Report data view table sorting doesn't work as expected.

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


How reproducible:
Reproducible with certain reports

Steps to Reproduce:
1. Navigate to reports and generate a report based on (Tenant, Tenant Quotas, Tenant Quotas).
2. Navigate to the generated report's data view and sort the table by `Quota Name`.


Actual results:
1.
2. Table is not sorted in alphabetical order.

Expected results:
1.
2. Table must be sorted in alphabetical order.

Additional info:
It will be helpful to determine how exactly these columns are sorted.

Comment 2 Parthvi Vala 2019-10-14 11:47:34 UTC
Created attachment 1625587 [details]
Report sorted in descending order

Comment 4 Yuri Rudman 2019-10-17 22:02:15 UTC
Parthvi,

 Sorting in Quota Name column done alphabetically but issue that there is 2 step process: first sort value stored on DB (which are cpu_allocated, mem_allocated, storage_allocated, vms_allocated, templates_allocated) and after that replace sorted value with translated  and better strings (Allocated Virtual CPUs, ...). As result sorting on replaced String may look strange.

It would be good to test fix for this BZ for some other than English language which has translation for "Allocated Virtual CPUs",...

Comment 7 CFME Bot 2019-10-24 20:45:36 UTC
New commit detected on ManageIQ/manageiq/master:

https://github.com/ManageIQ/manageiq/commit/28e48f8f05852fb1c3b44cc0767041f1285b01f8
commit 28e48f8f05852fb1c3b44cc0767041f1285b01f8
Author:     Yuri Rudman <yrudman>
AuthorDate: Wed Oct 16 16:47:57 2019 -0400
Commit:     Yuri Rudman <yrudman>
CommitDate: Wed Oct 16 16:47:57 2019 -0400

    quota name saved in Db are not descriptive and not translated. So, TenantQuota report replaces Db value with human readable and translated value,Example: cpu_allocated will be shown as "Allocated Virtual CPUs".
    BUT sorting by quota_name column done before substitution and result looks like bug in sorting.
    Fix: instead of TenanatQuota#name field use in report virtual column TenanatQuota#description which will show substituted value
    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1761430

 app/models/tenant_quota.rb | 7 +-
 1 file changed, 6 insertions(+), 1 deletion(-)


Note You need to log in before you can comment on or make changes to this bug.