Bug 1395965

Summary: Removing actions from VM Compliance Check event removes the event from the compliance policy
Product: Red Hat CloudForms Management Engine Reporter: Morgan Weetman <mweetman>
Component: UI - OPSAssignee: Harpreet Kataria <hkataria>
Status: CLOSED CURRENTRELEASE QA Contact: Dmitry Misharov <dmisharo>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.6.0CC: dclarizi, hkataria, jhardy, mpovolny, obarenbo, simaishi
Target Milestone: GAKeywords: TestOnly, ZStream
Target Release: 5.8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: control
Fixed In Version: 5.8.0.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1413119 (view as bug list) Environment:
Last Closed: 2017-06-12 16:52:23 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: CFME Core Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1413119    
Attachments:
Description Flags
VM Compliance Check with actions
none
Actions removed from VM Compliance Check, event disappears none

Description Morgan Weetman 2016-11-17 05:50:40 UTC
Created attachment 1221470 [details]
VM Compliance Check with actions

Description of problem:
Removing actions from VM Compliance Check event removes the event from the compliance policy completely, there is no way to get the event back other than by deleting the compliance policy and recreating it.

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

How reproducible:

Steps to Reproduce:
1. Create a VM compliance policy
2. Assign actions to the VM Compliance Check event, save changes.
3. Remove all actions from the VM Compliance Check event, save changes.


Actual results:
VM Compliance Check event is removed from the compliance policy.

Expected results:
Should be able to edit VM Compliance Check event and add new actions.

Additional info:

Comment 2 Morgan Weetman 2016-11-17 05:51:40 UTC
Created attachment 1221471 [details]
Actions removed from VM Compliance Check, event disappears

Comment 5 CFME Bot 2017-01-10 18:08:15 UTC
New commit detected on ManageIQ/manageiq-ui-classic/master:
https://github.com/ManageIQ/manageiq-ui-classic/commit/92d65910a50ed4a96aaeb713138f802b01fc2fba

commit 92d65910a50ed4a96aaeb713138f802b01fc2fba
Author:     Harpreet Kataria <hkataria>
AuthorDate: Mon Jan 9 16:06:06 2017 -0500
Commit:     Harpreet Kataria <hkataria>
CommitDate: Tue Jan 10 09:27:48 2017 -0500

    Policy Event must have at least one action assigned to it
    
    Made changes to not allow deleting all actions from a Policy Event, at least one action should be there.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1395965

 app/controllers/miq_policy_controller/events.rb    |  6 +++
 .../miq_policy_controller/events_spec.rb           | 61 ++++++++++++++++++++++
 2 files changed, 67 insertions(+)
 create mode 100644 spec/controllers/miq_policy_controller/events_spec.rb

Comment 7 Dmitry Misharov 2017-03-03 15:28:02 UTC
Verified in 5.8.0.3.20170301174324_1e2e0c4, it's not possible to delete all actions from a compliance policy.