Bug 1335572 - Conditions in Policy profile are not removed immediately after deletion
Summary: Conditions in Policy profile are not removed immediately after deletion
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: UI - OPS
Version: 5.6.0
Hardware: All
OS: All
medium
medium
Target Milestone: GA
: 5.6.0
Assignee: Harpreet Kataria
QA Contact: Dmitry Misharov
URL:
Whiteboard: ui:control
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-05-12 14:27 UTC by Dmitry Misharov
Modified: 2016-06-29 15:59 UTC (History)
6 users (show)

Fixed In Version: 5.6.0.8
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-06-29 15:59:52 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Condition details screens (103.84 KB, image/png)
2016-05-13 21:09 UTC, Harpreet Kataria
no flags Details
Policy details (76.31 KB, image/png)
2016-05-13 21:10 UTC, Harpreet Kataria
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1348 0 normal SHIPPED_LIVE CFME 5.6.0 bug fixes and enhancement update 2016-06-29 18:50:04 UTC

Description Dmitry Misharov 2016-05-12 14:27:23 UTC
Description of problem:
Conditions in Policy profile are not removed immediately after deletion, page refresh is required.

Version-Release number of selected component (if applicable):
5.6.0.6-beta2.5.20160511140943_ff75fb2

How reproducible:
Always

Steps to Reproduce:
1. Navigate to Control->Explorer.
2. Create a test policy.
3. Create a test policy profile.
4. Assign the test policy to the test policy profile.
5. Create a test conditions.
6. Delete the test condition.

Actual results:
The test condition is still presented in the UI, but it's deleted from the db. After page refreshing the condition will be removed.

Expected results:
The condition should be removed immediately after deletion.

Comment 3 Harpreet Kataria 2016-05-13 21:08:26 UTC
Dmitry,

Above mentioned steps are not very clear to me. If I assign a condition to a policy or a policy Profile and then try to delete the Condition from Conditions accordion, Delete button is disabled as the Condition is in use at that point. See attached screenshots for conditions assignment and condition details screen with Delete button disabled.

Can you please provide exact recipe or an appliance when i can recreate the issue, that will be great.

Thanks,
~Harpreet

Comment 4 Harpreet Kataria 2016-05-13 21:09:36 UTC
Created attachment 1157358 [details]
Condition details screens

Comment 5 Harpreet Kataria 2016-05-13 21:10:13 UTC
Created attachment 1157359 [details]
Policy details

Comment 6 Harpreet Kataria 2016-05-13 21:15:18 UTC
Dmitry, 

please ignore my comment #3 i was able to recreate the issue, Had to Create a condition using "Create a new condition assigned to this Policy" button from Policy Profiles accordion, and then try to delete the condition from same location.

~Harpreet

Comment 7 Harpreet Kataria 2016-05-16 13:23:26 UTC
https://github.com/ManageIQ/manageiq/pull/8728

Comment 8 CFME Bot 2016-05-17 14:00:50 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/c747cc8afbc408c86b3a2fc6f93aaa5877a61575

commit c747cc8afbc408c86b3a2fc6f93aaa5877a61575
Author:     Harpreet Kataria <hkataria>
AuthorDate: Mon May 16 09:21:25 2016 -0400
Commit:     Harpreet Kataria <hkataria>
CommitDate: Mon May 16 09:21:25 2016 -0400

    Fixed a typo introduced during localization changes.
    
    - Added spec test to verify removal of condition from Policy.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1335572

 app/controllers/miq_policy_controller/conditions.rb   |  4 ++--
 .../miq_policy_controller/conditions_spec.rb          | 19 +++++++++++++++++++
 2 files changed, 21 insertions(+), 2 deletions(-)
 create mode 100644 spec/controllers/miq_policy_controller/conditions_spec.rb

Comment 9 Dmitry Misharov 2016-05-26 07:02:11 UTC
Verified fixed in 5.6.0.8-rc1.20160524155303_f2a5a50.

Comment 11 errata-xmlrpc 2016-06-29 15:59:52 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/RHBA-2016:1348


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