Bug 715404 - Can create the same group over and over
Can create the same group over and over
Product: RHQ Project
Classification: Other
Component: Core UI (Show other bugs)
All All
medium Severity medium (vote)
: ---
: ---
Assigned To: Heiko W. Rupp
Mike Foley
Depends On:
Blocks: jon30-bugs jon30-sprint8
  Show dependency treegraph
Reported: 2011-06-22 14:45 EDT by Mike Foley
Modified: 2012-02-07 14:28 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-02-07 14:28:10 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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

  None (edit)
Description Mike Foley 2011-06-22 14:45:48 EDT
Description of problem:  Can create the same group over and over.  

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

How reproducible:

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 09:48:15 EDT
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 10:01:29 EDT
(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 05:25:22 EDT
Created attachment 530449 [details]
Proposed patch
Comment 4 John Mazzitelli 2011-10-27 09:58:11 EDT
(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 10:27:08 EST
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 15:57:05 EST
e6d54f1 in master
Comment 7 Heiko W. Rupp 2011-11-10 03:07:13 EST
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 10:42:50 EST
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 11:06:31 EST
a7d370d in release branch
Comment 10 Mike Foley 2011-11-11 15:47:51 EST
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 15:48:22 EST
Created attachment 533165 [details]
3 groups with the same name
Comment 12 Mike Foley 2011-11-14 11:59:09 EST
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 14:28:10 EST
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.