Bug 783577

Summary: System Templates - Removing an unsaved template triggers problematic Confirm message
Product: Red Hat Satellite Reporter: Corey Welton <cwelton>
Component: WebUIAssignee: Justin Sherrill <jsherril>
Status: CLOSED CURRENTRELEASE QA Contact: Katello QA List <katello-qa-list>
Severity: medium Docs Contact:
Priority: urgent    
Version: 6.0.0CC: jsherril, mmccune
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-08-22 18:22:05 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Corey Welton 2012-01-20 21:55:11 UTC
Description of problem:
Upon deletion of a system template, sometimes the UI pops up a confirm button that, when confirming, causes a UI error. Additionally, sometimes the left pane does not reset, returning to the "home" breadcrumb, but this is harder to reproduce

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


How reproducible:


Steps to Reproduce:
1.  Sync RH content
2.  Create a new template, "blah"
3.  System Templates (left pane) > Products; in the search box, enter "R" and select one of the resulting products; +Add
4.  Click the remove button at the bottom of the pane (not the product 'Remove' link); confirm
5.  View secondary confirm button that appears ("Save Changes", "Discard Changes")
6.  Hit "Save Changes"
  
Actual results:
* Most of the time - Error box requiring page reload.
* Occasionally (haven't figured out the heuristic) - template gets removed but left pane does not update - still shows items in various states of +Add / +Remove

Expected results:
I don't think we should be seeing this at all. I think this is an artifact of modifying an unsaved template.



Additional info:
The error message sometimes seen is similar to that of bug #751159

Comment 2 Corey Welton 2012-02-22 04:09:59 UTC
Step 3 above should read "right pane" :P

This is seriously ugly. I'm not sure why we can hit the remove button before a template has ever been saved. But it breaks the page in strange and interesting ways.

Comment 3 Justin Sherrill 2012-02-29 19:35:32 UTC
Fixed it so we do not ask to 'save changes'  if you've deleted.  That wasn't intended to show up after deletion.

61585fdaf16d20d9826dda20a01bdf700c517cfa

Comment 5 Corey Welton 2012-03-01 19:58:57 UTC
QA Verified.  0.1.301-2.el6