Bug 1454428

Summary: service dialog saving elements when switching elements - cancel only reverts current element
Product: Red Hat CloudForms Management Engine Reporter: Jeffrey Cutter <jcutter>
Component: UI - OPSAssignee: Harpreet Kataria <hkataria>
Status: CLOSED CURRENTRELEASE QA Contact: Shveta <sshveta>
Severity: medium Docs Contact:
Priority: high    
Version: 5.7.0CC: cpelland, dajohnso, hkataria, jhardy, mpovolny, obarenbo, sshveta
Target Milestone: GAKeywords: TestOnly, ZStream
Target Release: 5.9.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: service:dialog
Fixed In Version: 5.9.0.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1460808 (view as bug list) Environment:
Last Closed: 2018-03-06 14:41:01 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:
Embargoed:
Bug Depends On:    
Bug Blocks: 1460808    

Description Jeffrey Cutter 2017-05-22 17:28:14 UTC
Description of problem:

If you edit a service dialog and change one element in a box, then click to a different element in the box and change it as well, then click cancel.  The first element's changes will be saved and the second element will not.

In other words, the service dialog is saving the current element when you switch to a new element.

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

5.7.1.3.20170221135006_818f133

Actual results:

service dialog saves changes to current element when you switch to a new element and then click cancel.

Expected results:

all changes should be reverted since we never clicked the save button.

Comment 2 Harpreet Kataria 2017-05-26 20:06:24 UTC
https://github.com/ManageIQ/manageiq-ui-classic/pull/1445

Comment 3 CFME Bot 2017-06-07 15:18:59 UTC
New commit detected on ManageIQ/manageiq-ui-classic/master:
https://github.com/ManageIQ/manageiq-ui-classic/commit/f2fefea679fc5be4db80cf4cb822c0da5f651a34

commit f2fefea679fc5be4db80cf4cb822c0da5f651a34
Author:     Harpreet Kataria <hkataria>
AuthorDate: Fri May 26 15:56:57 2017 -0400
Commit:     Harpreet Kataria <hkataria>
CommitDate: Fri May 26 15:56:57 2017 -0400

    Rollback any changes to Dialog object when validating dialog elements.
    
    We need to update the actual Dialog object and it's child elements when edit is in progress, after user makes changes to any elements if they make selection in the tree, dialog is validated to make sure user does not try to leave the screen/node without adding valid data before they add/edit more child elements. Fix in this PR is rolling back any changes to actual dialog object after validating the Dialog to bring it back to it's original state to fix the issue.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1454428

 .../miq_ae_customization_controller/dialogs.rb     |  1 +
 .../dialogs_spec.rb                                | 27 ++++++++++++++++++----
 2 files changed, 23 insertions(+), 5 deletions(-)

Comment 5 Shveta 2017-11-01 03:55:27 UTC
Fixed in 5.9.0.4.20171024163837_ef71ea6