Bug 1270381

Summary: Report charts fail to render
Product: Red Hat CloudForms Management Engine Reporter: Dan Clarizio <dclarizi>
Component: UI - OPSAssignee: Martin Povolny <mpovolny>
Status: CLOSED ERRATA QA Contact: Milan Falešník <mfalesni>
Severity: high Docs Contact:
Priority: high    
Version: 5.5.0CC: cpelland, hkataria, jhardy, mpovolny, obarenbo, simaishi
Target Milestone: GA   
Target Release: 5.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 5.5.0.11 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-12-08 13:36:05 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:

Description Dan Clarizio 2015-10-09 20:23:14 UTC
Description of problem:
Running a report with a chart based on numeric field values causes an exception when trying to render the chart

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

How reproducible:
Create a Virtual Machines based chart, summarize by Host, then by OS Name and chart the Total of the Number of CPUs column

Actual results:
[----] I, [2015-10-09T13:07:34.907424 #19045:b4f988]  INFO -- : Started GET "/report/render_chart?height=250&rand=26939179&width=350" for 127.0.0.1 at 2015-10-09 13:07:34 -0700
[----] I, [2015-10-09T13:07:34.969630 #19045:b4f988]  INFO -- : Processing by ReportController#render_chart as JSON
[----] I, [2015-10-09T13:07:34.969823 #19045:b4f988]  INFO -- :   Parameters: {"height"=>"250", "rand"=>"26939179", "width"=>"350"}
[----] F, [2015-10-09T13:07:35.258592 #19045:b4f988] FATAL -- : Error caught: [NoMethodError] undefined method `[]' for nil:NilClass
/home/dclarizio/dev/manageiq/lib/report_formatter/chart_common.rb:461:in `block (2 levels) in build_numeric_chart_grouped_2dim'
/home/dclarizio/dev/manageiq/lib/report_formatter/chart_common.rb:459:in `each'
/home/dclarizio/dev/manageiq/lib/report_formatter/chart_common.rb:459:in `inject'
/home/dclarizio/dev/manageiq/lib/report_formatter/chart_common.rb:459:in `block in build_numeric_chart_grouped_2dim'
/home/dclarizio/dev/manageiq/lib/report_formatter/chart_common.rb:458:in `each'
/home/dclarizio/dev/manageiq/lib/report_formatter/chart_common.rb:458:in `each_with_object'
/home/dclarizio/dev/manageiq/lib/report_formatter/chart_common.rb:458:in `build_numeric_chart_grouped_2dim'
/home/dclarizio/dev/manageiq/lib/report_formatter/jqplot.rb:129:in `build_numeric_chart_grouped_2dim'
/home/dclarizio/dev/manageiq/lib/report_formatter/chart_common.rb:569:in `build_reporting_chart_numeric'
/home/dclarizio/dev/manageiq/lib/report_formatter/chart_common.rb:58:in `call'
/home/dclarizio/dev/manageiq/lib/report_formatter/chart_common.rb:58:in `build_document_body'

Expected results:
Rendered chart

Additional info:
This seems to be happening only upstream as I was trying to duplicate another issue I saw downstream

Comment 2 Martin Povolny 2015-11-17 10:23:29 UTC
Confirming the bug.

This is an issue related to the model renames.

The representation of the column for charts collides with the renamed VM* classes.


"Vm::Providers::InfraManager::Vm-num_cpu:total" is in place of "Vm:total" and split on ':'.

Comment 3 CFME Bot 2015-11-17 23:06:40 UTC
New commit detected on cfme/5.5.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=d0f95f54826e9620856d66564bfd72dc492c8be4

commit d0f95f54826e9620856d66564bfd72dc492c8be4
Merge: 24032f6 ed72d82
Author:     Oleg Barenboim <obarenbo>
AuthorDate: Tue Nov 17 17:19:11 2015 -0500
Commit:     Oleg Barenboim <obarenbo>
CommitDate: Tue Nov 17 17:19:11 2015 -0500

    Merge branch 'chart_cherry' into '5.5.z'
    
    Charts: handle model names with namespaces.
    
    https://github.com/ManageIQ/manageiq/pull/5476
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1270381
    
    See merge request !489

 lib/report_formatter/chart_common.rb             | 13 ++++++-----
 spec/lib/report_formater/jqplot_formater_spec.rb | 28 ++++++++++++++++++++++++
 2 files changed, 36 insertions(+), 5 deletions(-)

Comment 4 Milan Falešník 2015-11-19 10:17:31 UTC
This appears fixed on 5.5.0.11

Comment 6 errata-xmlrpc 2015-12-08 13:36:05 UTC
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/RHSA-2015:2551