Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed sorting in TenantQuotas report #19415

Merged

Conversation

yrudman
Copy link
Contributor

@yrudman yrudman commented Oct 17, 2019

Issue: quota names 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 was executed before substitution and final result looks in strange order.

Fix: Introduce virtual column TenantQuota#description and use it in report instead of TenanatQuota#name so sorting will be executed on actual visible strings

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

BEFORE:
before

AFTER:
after

@miq-bot add-label bug, reporting, ivanchuk/yes, changelog/no

@yrudman
Copy link
Contributor Author

yrudman commented Oct 17, 2019

@miq-bot remove-label changelog/no

@yrudman
Copy link
Contributor Author

yrudman commented Oct 17, 2019

@miq-bot add-label changelog/yes

@yrudman yrudman changed the title Fixed sorting in TenanatQuotas report by added virtual column tenant_quota#description Fixed sorting in TenantQuotas report by added virtual column TenantQuota#description Oct 17, 2019
@yrudman yrudman force-pushed the add-virtual-column-tenant-quote-description branch from 00a615c to 7a976ba Compare October 18, 2019 16:09
@yrudman yrudman changed the title Fixed sorting in TenantQuotas report by added virtual column TenantQuota#description Fixed sorting in TenantQuotas report Oct 18, 2019
…nantQuota 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
@yrudman yrudman force-pushed the add-virtual-column-tenant-quote-description branch from 7a976ba to cded423 Compare October 18, 2019 16:14
@miq-bot
Copy link
Member

miq-bot commented Oct 18, 2019

Checked commits yrudman/manageiq@28e48f8~...cded423 with ruby 2.4.6, rubocop 0.69.0, haml-lint 0.20.0, and yamllint 1.10.0
2 files checked, 0 offenses detected
Everything looks fine. 🍪

@yrudman
Copy link
Contributor Author

yrudman commented Oct 21, 2019

@lpichler Libor, could you review

Copy link
Contributor

@lpichler lpichler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks 👍

@kbrock kbrock added this to the Sprint 123 Ending Oct 28, 2019 milestone Oct 24, 2019
@kbrock kbrock self-assigned this Oct 24, 2019
@kbrock kbrock merged commit cda37c1 into ManageIQ:master Oct 24, 2019
@yrudman
Copy link
Contributor Author

yrudman commented Oct 24, 2019

thank you @kbrock

@yrudman yrudman deleted the add-virtual-column-tenant-quote-description branch October 24, 2019 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants