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
Order Sub Metrics of Storage types in Rate editor #2812
Order Sub Metrics of Storage types in Rate editor #2812
Conversation
@miq-bot add_label chargeback, gaprindashvili/yes |
@hstastna Cannot apply the following label because they are not recognized: chargeback |
f0cfd69
to
2b8ae25
Compare
fixing ManageIQ#2799 Order Sub Metrics of Storage types in Rate editor correctly when editing newly created Chargeback Rate in Cloud Intel -> Chargeback -> Rates.
2b8ae25
to
b1c6bc7
Compare
Checked commit hstastna@b1c6bc7 with ruby 2.3.3, rubocop 0.47.1, haml-lint 0.20.0, and yamllint 1.10.0 app/views/chargeback/_cb_rate_edit_table.html.haml
|
@miq-bot add_label bug |
�@miq-bot assign @mzazrivec |
@hstastna Cannot apply the following label because they are not recognized: chargeback |
@miq-bot assign @mzazrivec |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tested 👍 working as expected
…_rate_edit Order Sub Metrics of Storage types in Rate editor (cherry picked from commit 42bc7e3) Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1526068
Gaprindashvili backport details:
|
fixing
Issue with more info: #2799
BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1517802
Order Sub Metrics of Storage types (under Rate Details) in Rate editor
correctly when editing newly created Chargeback Rate in Cloud Intel ->
Chargeback -> Rates.
Details:
The problem was that Rate Details were not sorted when editing the details after choosing
Edit this Chargeback Rate under Configuration comparing to showing the details where the
details are sorted by group, description and sub metric.
Solution:
Adding just sorting the details by group, description and sub metric was not enough. It solved
ordering but then there the problem occurred that after editing the rate and saving the changes,
the changes did not correspond to the right row under Rate Details.
Getting the right
detail_index
solved this. We cannot rely just on order of the details, sodetail_index is set according to the id of rate detail, so we can now get proper array from
@edit[:new][:tiers]
and edit appropriate values correctly.Before:
Video:
https://user-images.githubusercontent.com/14937244/33130609-35639070-cf94-11e7-9826-86bb8a18cb61.gif
Example:
After: