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.
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
Created attachment 1157358 [details] Condition details screens
Created attachment 1157359 [details] Policy details
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
https://github.com/ManageIQ/manageiq/pull/8728
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
Verified fixed in 5.6.0.8-rc1.20160524155303_f2a5a50.
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