Bug 1394316 - Out of the box reports with PolicyEvent or EventStream db are throwing an error
Summary: Out of the box reports with PolicyEvent or EventStream db are throwing an error
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: UI - OPS
Version: 5.7.0
Hardware: Unspecified
OS: Linux
high
high
Target Milestone: GA
: 5.8.0
Assignee: Harpreet Kataria
QA Contact: Ievgen Zapolskyi
URL:
Whiteboard: ui:timeline:report
Depends On:
Blocks: 1395310
TreeView+ depends on / blocked
 
Reported: 2016-11-11 17:04 UTC by Ievgen Zapolskyi
Modified: 2017-06-12 17:00 UTC (History)
6 users (show)

Fixed In Version: 5.8.0.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1395310 (view as bug list)
Environment:
Last Closed: 2017-06-12 17:00:25 UTC
Category: Bug
Cloudforms Team: CFME Core
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
back trace (7.86 KB, text/plain)
2016-11-11 17:04 UTC, Ievgen Zapolskyi
no flags Details

Description Ievgen Zapolskyi 2016-11-11 17:04:30 UTC
Created attachment 1219830 [details]
back trace

Description of problem:
Any attempt to open custom report in Cloud Intel->Timelines based on "Operations VM Power On/Off Events for Last Week" report causes exception in production.log and appropriate error "undefined method `each' for nil:NilClass [dashboard/tl_generate]".
Actually, my report has only one change Last Week -> This Week. 

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

How reproducible:
100%


Steps to Reproduce:
1. Add any provider. f.e. vsphere55
1. Create a copy of "Operations VM Power On/Off Events for Last Week" report and change its filter from Last Week to This Week
2. Start/Stop any vm
3. Queue the report and wait until it gets prepared
4. Try to open the report thru Cloud Intel->Timelines->Custom-><Custom Report>


Actual results:
error page and exception in production.log

Expected results:
correctly displayed timelines

Additional info:
Harpreet already looked into this issue

Comment 2 Ievgen Zapolskyi 2016-11-11 17:07:20 UTC
it is probably related to this issue 
https://bugzilla.redhat.com/show_bug.cgi?id=1391706

Comment 3 Harpreet Kataria 2016-11-11 18:28:00 UTC
https://github.com/ManageIQ/manageiq/pull/12593

Comment 4 CFME Bot 2016-11-12 00:06:28 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/8ebf1f368588622213bccf789ec95eb013fefebe

commit 8ebf1f368588622213bccf789ec95eb013fefebe
Author:     Harpreet Kataria <hkataria>
AuthorDate: Fri Nov 11 13:19:04 2016 -0500
Commit:     Harpreet Kataria <hkataria>
CommitDate: Fri Nov 11 13:34:40 2016 -0500

    Event building code fix for OOTB reports with db EventStream/PolicyEvent
    
    Need to skip building grouping of events in timeline for OOTB reports with db as EventStream/PolicyEvent. Events in these reports are not based on categories, all events in such reports are shown in one single group.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1394316

 lib/report_formatter/timeline.rb          |  4 +++-
 spec/lib/report_formater/timeline_spec.rb | 20 +++++++++++++++-----
 2 files changed, 18 insertions(+), 6 deletions(-)

Comment 5 Ievgen Zapolskyi 2016-11-14 08:54:07 UTC
I also run into this issue for default "Operations VMs Powered On/Off For Last Week" report. So, the issue is relevant for any report not only custom one.

Comment 6 CFME Bot 2016-11-14 15:11:08 UTC
New commit detected on ManageIQ/manageiq/euwe:
https://github.com/ManageIQ/manageiq/commit/6b459d2c1547aca6c3a3c2f779c00884070f311c

commit 6b459d2c1547aca6c3a3c2f779c00884070f311c
Author:     Dan Clarizio <dclarizi>
AuthorDate: Fri Nov 11 16:04:03 2016 -0800
Commit:     Oleg Barenboim <chessbyte>
CommitDate: Mon Nov 14 10:06:49 2016 -0500

    Merge pull request #12593 from h-kataria/timeline_fix_for_ootb_reports
    
    Event building code fix for OOTB reports with db EventStream/PolicyEvent
    (cherry picked from commit 7eb22b956d2d086a806fd30c78a6949c81111deb)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1394316

 lib/report_formatter/timeline.rb          |  4 +++-
 spec/lib/report_formater/timeline_spec.rb | 20 +++++++++++++++-----
 2 files changed, 18 insertions(+), 6 deletions(-)


Note You need to log in before you can comment on or make changes to this bug.