Bug 1402786 - policy events appear w/o information which entity those belong to in Timelines
Summary: policy events appear w/o information which entity those belong to in Timelines
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: Unspecified
medium
medium
Target Milestone: GA
: 5.8.0
Assignee: Harpreet Kataria
QA Contact: Ievgen Zapolskyi
URL:
Whiteboard: ui:timelines:usability
Depends On:
Blocks: 1411881
TreeView+ depends on / blocked
 
Reported: 2016-12-08 10:53 UTC by Ievgen Zapolskyi
Modified: 2017-06-12 17:16 UTC (History)
5 users (show)

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


Attachments (Terms of Use)
screenshot (75.13 KB, image/png)
2016-12-08 10:53 UTC, Ievgen Zapolskyi
no flags Details

Description Ievgen Zapolskyi 2016-12-08 10:53:02 UTC
Created attachment 1229437 [details]
screenshot

Description of problem:
If there is a vm with some policy events and I open timelines with policy events for provider/host/cluster, I see policy events w/o any information which entity those events belong to. See screenshot.

Actually, I'm not sure that policy events belonging to one entity should be displayed in timelines for another entity.
But if such events should be displayed, those should have appropriate information about owner like it is done for management events. 

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

How reproducible:
100%

Steps to Reproduce:
1. Create policy with condition and events which will produce policy events when vm's PowerState is changed (f.e Vm's PowerState is not Null)
2. Create a policy profile and add created above policy to it
3. Assign the policy profile to some vm
4. Start/Stop that vm
5. Make sure that appropriate policy events appeared in policy_events table of appliance's db
6. Open Timelines for f.e provider this vm belongs to
7. Setup Timelines to show the policy events of all categories and click Apply
8. Click appeared events and look at their details

Actual results:
policy events in provider's timelines appear w/o any information which entity those events belong to

Expected results:
If the policy events of underneath entity like vm, should appear in timelines for provider and so on. Then policy events should have enough information about their possessor.

If the policy events of one entity shouldn't appear in timelines for another entity. Then there shouldn't be any vms policy events in timelines for provider and so on.

Comment 2 Ievgen Zapolskyi 2016-12-08 16:10:38 UTC
this is true for Cloud Intel->Timelines->Policy Events ... Sample 1 report.

Comment 3 Harpreet Kataria 2016-12-13 22:28:28 UTC
https://github.com/ManageIQ/manageiq/pull/13162

Comment 4 CFME Bot 2016-12-16 22:01:26 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/c88ab80ebedda22777bf7f3ebd144bb464dda81c

commit c88ab80ebedda22777bf7f3ebd144bb464dda81c
Author:     Harpreet Kataria <hkataria@redhat.com>
AuthorDate: Tue Dec 13 17:21:19 2016 -0500
Commit:     Harpreet Kataria <hkataria@redhat.com>
CommitDate: Fri Dec 16 14:02:18 2016 -0500

    Added missing target information and links on Policy Event bubbles.
    
    changes in 4f650a999c893b7519d9e7648acea92b027f59ff introduced the issue variable e_text was initialized to '' ignoring the fact that it was being set in several places above in the code. Fixed code to use TimelineMessage class to set links and other target related information for PolicyEvent timelines event bubble.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1402786

 lib/report_formatter/timeline.rb                   | 36 ----------------------
 lib/report_formatter/timeline_message.rb           | 26 ++++++++++++++++
 .../miq_reports/tl_policy_events_daily.yaml        |  7 ++++-
 .../miq_reports/tl_policy_events_hourly.yaml       |  5 +++
 spec/lib/report_formater/timeline_spec.rb          | 23 ++++++++++++++
 5 files changed, 60 insertions(+), 37 deletions(-)


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