Bug 750895

Summary: Unable to detach drift definition from template in UI
Product: [Other] RHQ Project Reporter: John Sanda <jsanda>
Component: driftAssignee: John Sanda <jsanda>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.2   
Target Milestone: ---   
Target Release: JON 3.0.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
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: 707225, 749899    

Description John Sanda 2011-11-02 18:04:19 UTC
Description of problem:
If you go to edit a resource drift definition and set the 'Attached to Template' field to no, the change is not persisted in the database. Consequently, you are not able to detach a definition from the template from which it originated.

It is possible however to detach through the CLI. The problem though is not in in the UI. It just manifests itself in the UI because of the method calls made in the UI to apply the update to underlying DriftDefinition object.

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


How reproducible:
Always

Steps to Reproduce:
1. Go to create or edit a resource drift definition
2. Set the 'Attached to Template' field to no (i.e., false)
3. Save the change
   
Actual results:
The definition is still attached in the database.

Expected results:
The definition should be detached.

Additional info:
The problem is in DriftDefinition.setConfiguration. This is method called to actually update the definition in the UI. When I added the attached flag, I forgot to update the setConfiguration method to update the attached property along with the other properties that are updated in this method.

Comment 1 John Sanda 2011-11-02 19:25:15 UTC
Updating DriftDefinition to update its attached field when the underlying configuration is updated.

master branch commit hash:  1eb5ab398ad4c37cee6aed9c069cb1887a1fe2b2
release_jon3.x commit hash: 8955805230d595349a578326ff570946e96a80fd

Comment 2 Mike Foley 2011-11-03 18:44:18 UTC
verified build #684

Comment 3 Mike Foley 2012-02-07 19:26:14 UTC
marking VERIFIED JON 3 bugs to CLOSED/CURRENTRELEASE

Comment 4 Mike Foley 2012-02-07 19:27:46 UTC
changing status of VERIFIED BZs for JON 2.4.2 and JON 3.0 to CLOSED/CURRENTRELEASE