Answers.Body: <p>I suspect the reason is that the requirement that names be unique predates the ability to have parent groups.  That said, allowing non-unique groups would complicate UI design.  For instance, I've seen the scenario where someone has permission to view a parent group but not a child group.  In your case, if someone did that, they'd have no way to differentiate between Customers A and Customers B.</p>
  
  <p>That said, I don't think there's any other compelling reason not to drop the unique index from the name column in <code>civicrm_group</code> and see what happens.  Don't forget to create a new non-unique index once you delete the old one!</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-08-23T19:31:27.890Z
Answers.Text: I'm not sure how to understand your example. If the permission to view a child group is denied, how could the child groups be misunderstood?
  
  But as I read your answer, the typeahead group select controls come to my mind and yes, the UI design is challenging here. But on the other hand, administrators are free and nobody needs to assign duplicate group titles. 
  
  So why force it?
Answers.UserDisplayName: nielo
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-08-22T17:59:11.493Z
Answers.LastActivityDate: 2015-08-22T17:59:11.493Z
Answers.UserDisplayName: Jon G - Megaphone Tech
Answers.Body: <p>There are two (?!) fields giving name on groups:</p>
  
  <ul>
  <li>name</li>
  <li>title</li>
  </ul>
  
  <p>I suspect the duplicate check is only on the name field and not on title field.</p>
  
  <p>First create two groups in the UI with two different names. That creates the name field and the title field. Then you could change the title field again. Then you would have two unique name fields, and same title (which is the one shown in the UI)</p>
  
  <p><strong>Update: This doesn't work after all</strong></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-10-20T19:46:58.550Z
Answers.Text: Did you try this?
Answers.UserDisplayName: nielo
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-10-20T20:02:28.990Z
Answers.Text: Yes, I tried now and it didn't work. Even tried to change it in the SQL table. Sorry! It seems as the duplicate check is on the title field. This is a bit over my level, but since the SQL change also returned an error message stating: Duplicate entry for key 'UI title', I suspect it has something to do with general database structure and not CiviCRM code...
Answers.UserDisplayName: Flying
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-10-19T19:10:53.530Z
Answers.LastActivityDate: 2015-10-20T20:03:54.633Z
Answers.LastEditDate: 2015-10-20T20:03:54.633Z
Answers.UserDisplayName: Flying
Body: <p>I'm wondering why duplicates in group titles are forbidden. Unique names should satisfy all bao and dao needs, don't they?</p>
  
  <p>We need a repeated structure like</p>
  
  <pre><code>o project a
    o customers
    o services
    o orders
  o project b
    o customers
    o services
    o orders
  </code></pre>
  
  <p>and it seems, civi is prohibiting this.</p>
  
  <p>Any help would be appreciated, thx in advance // nielo</p>
  
Tags: <api><groups>
Title: Shouldn't duplicate group titles be possible?
ThreadText: # Shouldn't duplicate group titles be possible?
  
  (Asked by: username_0 on 2015-08-20)
  
  I'm wondering why duplicates in group titles are forbidden. Unique names should satisfy all bao and dao needs, don't they?
  
  We need a repeated structure like
  
  ```
  o project a
    o customers
    o services
    o orders
  o project b
    o customers
    o services
    o orders
  
  ```
  
  and it seems, civi is prohibiting this.
  
  Any help would be appreciated, thx in advance // username_0
  
  **Tags:** api, groups
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2015-08-22. Score: 0 | Accepted answer
  
  I suspect the reason is that the requirement that names be unique predates the ability to have parent groups. That said, allowing non-unique groups would complicate UI design. For instance, I've seen the scenario where someone has permission to view a parent group but not a child group. In your case, if someone did that, they'd have no way to differentiate between Customers A and Customers B.
  
  That said, I don't think there's any other compelling reason not to drop the unique index from the name column in `civicrm_group` and see what happens. Don't forget to create a new non-unique index once you delete the old one!
  
  > **Comments:**
  > **username_0**: I'm not sure how to understand your example. If the permission to view a child group is denied, how could the child groups be misunderstood?  But as I read your answer, the typeahead group select controls come to my mind and yes, the UI design is challenging here. But on the other hand, administrators are free and nobody needs to assign duplicate group titles.   So why force it?  
  
  ---
  
  ### Answer by username_2 on 2015-10-19. Score: 0
  
  There are two (?!) fields giving name on groups:
  
  * name
  * title
  
  I suspect the duplicate check is only on the name field and not on title field.
  
  First create two groups in the UI with two different names. That creates the name field and the title field. Then you could change the title field again. Then you would have two unique name fields, and same title (which is the one shown in the UI)
  
  **Update: This doesn't work after all**
  
  > **Comments:**
  > **username_0**: Did you try this?  
  > **username_2**: Yes, I tried now and it didn't work. Even tried to change it in the SQL table. Sorry! It seems as the duplicate check is on the title field. This is a bit over my level, but since the SQL change also returned an error message stating: Duplicate entry for key 'UI title', I suspect it has something to do with general database structure and not CiviCRM code...  
  
  ---
  
  