1

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 // nielo

0

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!

  • 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? – nielo Aug 23 '15 at 19:31
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

  • Did you try this? – nielo Oct 20 '15 at 19:46
  • 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... – Flying Oct 20 '15 at 20:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.