Bug 1369488

Summary: Compliance check history isn't shown if compliance policy is unconditional
Product: Red Hat CloudForms Management Engine Reporter: Dmitry Misharov <dmisharo>
Component: ControlAssignee: Lucy Fu <lufu>
Status: CLOSED CURRENTRELEASE QA Contact: Dmitry Misharov <dmisharo>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.6.0CC: dajohnso, jhardy, obarenbo, simaishi
Target Milestone: GAKeywords: TestOnly, ZStream
Target Release: 5.7.0   
Hardware: All   
OS: All   
Whiteboard: control:ui
Fixed In Version: 5.7.0.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1374450 (view as bug list) Environment:
Last Closed: 2017-01-11 20:20:34 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:
Bug Depends On:    
Bug Blocks: 1374450    

Description Dmitry Misharov 2016-08-23 14:27:11 UTC
Description of problem:
Compliance status and history is not shown in the web ui after compliance checking if a compliance policy is unconditional. In the other hand policy.log contains lines related to the policy.

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

How reproducible:
Always

Steps to Reproduce:
1. Navigate to Control->Explorer.
2. Expand Policy accordion.
3. Create an unconditional compliance policy for VM, host or whatever.
4. Create a policy profile with that policy.
5. Assign the policy profile to an appropriate item (VM, host etc).
6. In Policy menu of the item click on "Check Compliance of Last Known Configuration".
7. Refresh the page after a while.

Actual results:
There is no changes in Compliance section of the item, but policy.log contains events related with the policy.

Expected results:
Compliance section must contain result of the compliance checking.

Comment 3 CFME Bot 2016-09-07 18:55:54 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/74b6461c5a18f0d86e6ad4e348245bb01b33d559

commit 74b6461c5a18f0d86e6ad4e348245bb01b33d559
Author:     Lucy Fu <lufu>
AuthorDate: Wed Sep 7 10:14:27 2016 -0400
Commit:     Lucy Fu <lufu>
CommitDate: Wed Sep 7 13:52:04 2016 -0400

    Fix the issue that compliance check history isn't shown if compliance policy is unconditional.
    
    A compliance detail record is required to display the compliance check history.
    Create a compliance detail record for unconditional compliance policy.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1369488

 app/models/miq_policy.rb       |  2 ++
 spec/models/compliance_spec.rb | 29 +++++++++++++++++++++++++++++
 2 files changed, 31 insertions(+)

Comment 6 Dmitry Misharov 2016-09-19 12:24:27 UTC
Fixed and verified in 5.7.0.1.20160913164703_66caf07.