Bug 534880 (RHQ-1633)

Summary: error during group res config submission still redirects to history page
Product: [Other] RHQ Project Reporter: Joseph Marques <jmarques>
Component: ConfigurationAssignee: Lukas Krejci <lkrejci>
Status: CLOSED NEXTRELEASE QA Contact: Jeff Weiss <jweiss>
Severity: medium Docs Contact:
Priority: high    
Version: 1.2CC: dajohnso
Target Milestone: ---Keywords: SubBug
Target Release: ---   
Hardware: All   
OS: All   
URL: http://jira.rhq-project.org/browse/RHQ-1633
Whiteboard:
Fixed In Version: 1.2 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:
Bug Depends On:    
Bug Blocks: 534605    

Description Joseph Marques 2009-02-21 23:23:00 EST
if there are any errors submitting the group res config job to the backend, the logic should have the user stay on the page and to NOT end the conversation.  if the conversation is ended, the user will have to enter all of their fine-grained changes again.
Comment 1 Joseph Marques 2009-02-21 23:25:25 EST
rev3132 - ensure that the user stays on the edit group config page if there are errors submitting the job to the backend; 
Comment 2 Jeff Weiss 2009-03-26 10:14:22 EDT
 joseph: can you tell me how to create the error condition?
Comment 3 Joseph Marques 2009-03-26 10:32:27 EDT
there are two code paths to test:

1) authorization errors

* create a user that has initially has permission to change all of the configurations for the resources in the group
* go and edit the group config, but don't submit the changes yet
* in another tab, using the rhqadmin account, remove the "configure" permission from the group in question
* then try to submit the configuration job, it should fail with a permission error, and you should be kicked back to the *view* page because you no longer have edit permissions

2) other errors

* using any user in the system, open two tabs
* go to the same group, the configuration subtab
* start editing the configuration in both tabs
* hit submit in one tab, quickly switch to the other tab, hit submit on the second
* you should get an error for the second submit stating that a group update is already in progress, but you should remain on the *edit* page
* wait until the first group update has finished, then try resubmitting the second job again
* it should succeed this time and kick you to the history page to watch it complete
Comment 4 Jeff Weiss 2009-03-26 12:25:04 EDT
The general behavior of both tests is correct, but what's missing is an error/info message that says what happened.

in test 1,  i clicked 'save' and it just went back to the view page

in test 2, 2nd browser's 'save' just put me back on the edit page again - the changes i made are still there, but no message as to why i ended up back on the same page.
Comment 5 Lukas Krejci 2009-04-20 10:49:06 EDT
For scenario 1, the flow goes to the view page and an error message is shown that the user doesn't have enough privileges, for scenario 2, the user stays on the edit page and a warning is shown that the configuration update is in progress.
Comment 6 Jeff Weiss 2009-04-23 09:45:13 EDT
For scenario 1, goes back to view page with "no permission" message.

For scenario 2, message is 
Configuration update is currently in progress. Please consider reviewing the changes before submitting.  
Stays on edit page.

Fixed, rev3819
Comment 7 Red Hat Bugzilla 2009-11-10 15:37:09 EST
This bug was previously known as http://jira.rhq-project.org/browse/RHQ-1633