Bug 1284014
| Summary: | Don't have ability to add a new chargeback rate | |||
|---|---|---|---|---|
| Product: | Red Hat CloudForms Management Engine | Reporter: | Taras Lehinevych <tlehinev> | |
| Component: | UI - OPS | Assignee: | Milan Zázrivec <mzazrivec> | |
| Status: | CLOSED ERRATA | QA Contact: | Taras Lehinevych <tlehinev> | |
| Severity: | medium | Docs Contact: | ||
| Priority: | medium | |||
| Version: | 5.5.0 | CC: | cpelland, dajohnso, hkataria, jhardy, mpovolny, nachandr, obarenbo, simaishi, tlehinev | |
| Target Milestone: | GA | Keywords: | ZStream | |
| Target Release: | 5.6.0 | |||
| Hardware: | Unspecified | |||
| OS: | Unspecified | |||
| Whiteboard: | chargeback | |||
| Fixed In Version: | 5.6.0.0 | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 1289280 (view as bug list) | Environment: | ||
| Last Closed: | 2016-06-29 15:04:45 UTC | Type: | Bug | |
| Regression: | --- | Mount Type: | --- | |
| Documentation: | --- | CRM: | ||
| Verified Versions: | Category: | --- | ||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
| Cloudforms Team: | --- | Target Upstream Version: | ||
| Embargoed: | ||||
| Bug Depends On: | ||||
| Bug Blocks: | 1289280 | |||
|
Description
Taras Lehinevych
2015-11-20 14:38:06 UTC
New commit detected on ManageIQ/manageiq/master: https://github.com/ManageIQ/manageiq/commit/636466c24964f844cb6fb375897e278d77b54db3 commit 636466c24964f844cb6fb375897e278d77b54db3 Author: Milan Zazrivec <mzazrivec> AuthorDate: Thu Nov 26 11:46:21 2015 +0100 Commit: Milan Zazrivec <mzazrivec> CommitDate: Thu Dec 3 10:51:37 2015 +0100 Chargeback rates: correctly render tree nodes with no cb rates Chargeback rates tree builder needs to be able to create / render storage and compute tree nodes even when there are no chargeback rates available in the database. https://bugzilla.redhat.com/show_bug.cgi?id=1284014 app/presenters/tree_builder_chargeback_assignments.rb | 3 +-- app/presenters/tree_builder_chargeback_rates.rb | 3 +-- spec/presenters/tree_builder_chargeback_assignments.rb | 16 ++++++++++++++++ spec/presenters/tree_builder_chargeback_rates_spec.rb | 16 ++++++++++++++++ spec/presenters/tree_builder_spec.rb | 11 ++++++++++- 5 files changed, 44 insertions(+), 5 deletions(-) create mode 100644 spec/presenters/tree_builder_chargeback_assignments.rb create mode 100644 spec/presenters/tree_builder_chargeback_rates_spec.rb New commit detected on ManageIQ/manageiq/master: https://github.com/ManageIQ/manageiq/commit/636466c24964f844cb6fb375897e278d77b54db3 commit 636466c24964f844cb6fb375897e278d77b54db3 Author: Milan Zazrivec <mzazrivec> AuthorDate: Thu Nov 26 11:46:21 2015 +0100 Commit: Milan Zazrivec <mzazrivec> CommitDate: Thu Dec 3 10:51:37 2015 +0100 Chargeback rates: correctly render tree nodes with no cb rates Chargeback rates tree builder needs to be able to create / render storage and compute tree nodes even when there are no chargeback rates available in the database. https://bugzilla.redhat.com/show_bug.cgi?id=1284014 app/presenters/tree_builder_chargeback_assignments.rb | 3 +-- app/presenters/tree_builder_chargeback_rates.rb | 3 +-- spec/presenters/tree_builder_chargeback_assignments.rb | 16 ++++++++++++++++ spec/presenters/tree_builder_chargeback_rates_spec.rb | 16 ++++++++++++++++ spec/presenters/tree_builder_spec.rb | 11 ++++++++++- 5 files changed, 44 insertions(+), 5 deletions(-) create mode 100644 spec/presenters/tree_builder_chargeback_assignments.rb create mode 100644 spec/presenters/tree_builder_chargeback_rates_spec.rb Failed verification on 5.6.0.1-beta2 Delete the Default rate from Compute, then press Configuration -> Add new Chargeback Rate and as a result you will get Unexpected error encountered page. The same is for Storage. production.log FATAL -- : Error caught: [NoMethodError] undefined method `chargeback_rate_detail_currency_id' for nil:NilClass Fair enough, although what you're showing in comment #8 is a slightly different problem than what was described in the initial comment. I created a pull request which wouldn't allow deletion of default chargeback rates (causing the problem you found): https://github.com/ManageIQ/manageiq/pull/8086 New commit detected on ManageIQ/manageiq/master: https://github.com/ManageIQ/manageiq/commit/a647f6b8e4a62ef4113d9471fbef4c4fb06e1a9d commit a647f6b8e4a62ef4113d9471fbef4c4fb06e1a9d Author: Milan Zazrivec <mzazrivec> AuthorDate: Tue Apr 19 15:20:04 2016 +0200 Commit: Milan Zazrivec <mzazrivec> CommitDate: Tue Apr 19 17:22:28 2016 +0200 Don't allow deletion of default chargeback rates Default chargeback rates are seeded during database initialization and their deletion results into several problems propagated into UI (in several places we assume existence of these default rates). https://bugzilla.redhat.com/show_bug.cgi?id=1284014 app/controllers/chargeback_controller.rb | 7 +++++++ .../application_helper/button/chargeback_rate_edit.rb | 9 +++++++++ .../application_helper/button/chargeback_rate_remove.rb | 9 +++++++++ .../application_helper/toolbar/chargeback_center.rb | 6 ++++-- app/models/chargeback_rate.rb | 8 ++++++++ spec/models/chargeback_rate_spec.rb | 15 +++++++++++++++ 6 files changed, 52 insertions(+), 2 deletions(-) create mode 100644 app/helpers/application_helper/button/chargeback_rate_edit.rb create mode 100644 app/helpers/application_helper/button/chargeback_rate_remove.rb Verified in 5.6.0.4-beta2.3 Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2016:1348 |