Bug 715404 - Can create the same group over and over
Summary: Can create the same group over and over
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: Core UI
Version: 4.1
Hardware: All
OS: All
medium
medium
Target Milestone: ---
: ---
Assignee: Heiko W. Rupp
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On:
Blocks: jon30-bugs jon30-sprint8
TreeView+ depends on / blocked
 
Reported: 2011-06-22 18:45 UTC by Mike Foley
Modified: 2012-02-07 19:28 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2012-02-07 19:28:10 UTC
Embargoed:


Attachments (Terms of Use)
Proposed patch (24.29 KB, patch)
2011-10-27 09:25 UTC, Heiko W. Rupp
hrupp: review? (ian.springer)
Details | Diff
3 groups with the same name (22.10 KB, image/png)
2011-11-11 20:48 UTC, Mike Foley
no flags Details

Description Mike Foley 2011-06-22 18:45:48 UTC
Description of problem:  Can create the same group over and over.  


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


How reproducible:
100%

Steps to Reproduce:
1.  Inventory-->Compatible-Groups
2.  Click New button
3.  Create a new group with the same name as an existing group
  
Actual results:
There is no warning when the group is created a 2nd time that a group of the same name already exists.  


Expected results:
A warning that a group of the same name already exists.

Additional info:
The expected behavior is not exactly intuitive or clear on creating a 2nd group of the same name.  SHould it overwrite?  SHould there be a warning that a group with that name already exists?

Comment 1 Heiko W. Rupp 2011-10-26 13:48:15 UTC
Found that in the source :

// GH: We are now allowing Groups where names collide... TODO, should this only be allowed for cluster auto backing groups?

Comment 2 John Mazzitelli 2011-10-26 14:01:29 UTC
(In reply to comment #1)
> Found that in the source :
> 
> // GH: We are now allowing Groups where names collide... TODO, should this only
> be allowed for cluster auto backing groups?

ah.. right, this is to support our under-the-covers backing groups which could have the same name.

Comment 3 Heiko W. Rupp 2011-10-27 09:25:22 UTC
Created attachment 530449 [details]
Proposed patch

Comment 4 John Mazzitelli 2011-10-27 13:58:11 UTC
(In reply to comment #3)
> Created attachment 530449 [details]
> Proposed patch

I am not comfortable with this solution. This actually seems to load every group in memory when you are in the group create wizard, and for users with very large numbers of groups, this may not be good.

I would prefer that we use a query that says, "given a group name G, is this already in use?". If the group exists, we should fail. If it doesn't exist, we can continue. If the problem is that the async nature doesn't easily allow for this in the wizard infrastructure, just have the Finish button collect the error thrown by the server side, we popup an error message saying, "A Group by that name already exists" and force the user to try again.

Comment 5 Heiko W. Rupp 2011-11-08 15:27:08 UTC
it is about the wizard infrastructure. I am totally comfortable by just displaying an error at the end.

Comment 6 Heiko W. Rupp 2011-11-09 20:57:05 UTC
e6d54f1 in master

Comment 7 Heiko W. Rupp 2011-11-10 08:07:13 UTC
Assigning to mike to qualify on master. When this is ok, he will assign back and I'll push it to the release branch.

Comment 8 Mike Foley 2011-11-11 15:42:50 UTC
verified in master 11/11/2011.  OK to push to the jon 3.0 branch.  changing status to ON_DEV and assigning to heiko.

Comment 9 Heiko W. Rupp 2011-11-11 16:06:31 UTC
a7d370d in release branch

Comment 10 Mike Foley 2011-11-11 20:47:51 UTC
okay ... this is fail-to-verify in jon 3 branch.

i myself tested this on master ... and saw the yellow warning on creating a group with the same name.

but ...

here on the jon 3 branch ... (just installed from https://hudson.qa.jboss.com/hudson/view/JON3%20Core/job/rhq-release-gwt-locales/7/ ) ... i can create a 2nd group with the same name.  in fact ... the very same compat group named 'test' which i used in master ... i am using again in the jon 3 branch.  

i don't get it.  

attaching screenshot named "3groupswithsamename.png" which shows 3 groups with the very same name.

Comment 11 Mike Foley 2011-11-11 20:48:22 UTC
Created attachment 533165 [details]
3 groups with the same name

Comment 12 Mike Foley 2011-11-14 16:59:09 UTC
perhaps previous comment #10 did not include the fix.

i am seeing the correct behavior now in jon 3 branch.

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


Note You need to log in before you can comment on or make changes to this bug.