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

Fix chargeback report with unassigned rates #15580

Conversation

lpichler
Copy link
Contributor

caused by #13857

Fill :unit only if we can determine unit from rates

otherwise

method ApplicationController.helpers.number_with_delimiter is called
(thru apply_format_function and format_currency_with_delimiter is called)
with parameters:
ApplicationController.helpers.number_to_currency('0.0', {:unit => nil} )
which is causing the error.

Test Scenario

  1. Try to generate chargeback report and don't assign any rates
    it will throw an error,
    with this fix it will generate report but without cost values (there are no rates assigned)

Links

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

@miq-bot add_label bug, reporting
@miq-bot assign @gtanzillo

cc @isimluk

otherwise

method ApplicationController.helpers.number_with_delimiter is called
 (thru  apply_format_function and format_currency_with_delimiter is called)
with parameters:

ApplicationController.helpers.number_to_currency('0.0', {:unit => nil} )

which is causing error.
@miq-bot
Copy link
Member

miq-bot commented Jul 17, 2017

Checked commits lpichler/manageiq@c1111ce~...2564953 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0
2 files checked, 0 offenses detected
Everything looks fine. 🍰

@lpichler lpichler force-pushed the fix_chargeback_report_with_unassigned_rates branch from 2564953 to c1111ce Compare July 17, 2017 18:53
@lpichler lpichler closed this Jul 17, 2017
@lpichler lpichler reopened this Jul 17, 2017
@isimluk isimluk self-requested a review July 18, 2017 06:08
@isimluk
Copy link
Member

isimluk commented Jul 18, 2017

Thanks! Nice catch! 🐁

Copy link
Member

@gtanzillo gtanzillo left a comment

Choose a reason for hiding this comment

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

👍

@gtanzillo gtanzillo merged commit 03df095 into ManageIQ:master Jul 18, 2017
@gtanzillo gtanzillo added this to the Sprint 65 Ending Jul 24, 2017 milestone Jul 18, 2017
@lpichler lpichler deleted the fix_chargeback_report_with_unassigned_rates branch July 18, 2017 13:00
@lpichler
Copy link
Contributor Author

@miq-bot add_label blocker

@simaishi

simaishi pushed a commit that referenced this pull request Jul 19, 2017
…assigned_rates

Fix chargeback report with unassigned rates
(cherry picked from commit 03df095)

https://bugzilla.redhat.com/show_bug.cgi?id=1472837
@simaishi
Copy link
Contributor

Fine backport details:

$ git log -1
commit c759eb3f158ccede33b8cd7d8ae554724ca9fd65
Author: Gregg Tanzillo <gtanzill@redhat.com>
Date:   Tue Jul 18 08:59:29 2017 -0400

    Merge pull request #15580 from lpichler/fix_chargeback_report_with_unassigned_rates
    
    Fix chargeback report with unassigned rates
    (cherry picked from commit 03df095f53c2aaeffd1307f8cfb9a4803c56a2c8)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1472837

d-m-u pushed a commit to d-m-u/manageiq that referenced this pull request Jun 6, 2018
…_with_unassigned_rates

Fix chargeback report with unassigned rates
(cherry picked from commit 03df095)

https://bugzilla.redhat.com/show_bug.cgi?id=1472837
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.

None yet

5 participants