CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Discussion (deprecated) »
  • Alpha and Beta Release Testing »
  • 3.0 Release Testing »
  • Editing group removes its parent; parent drop-down has only a subset of groups
Pages: [1]

Author Topic: Editing group removes its parent; parent drop-down has only a subset of groups  (Read 1932 times)

davej

  • Ask me questions
  • ****
  • Posts: 404
  • Karma: 21
Editing group removes its parent; parent drop-down has only a subset of groups
August 06, 2009, 08:59:19 am
Already discussed with Deepak on IRC today, recording observations here, with svn rev 23146.

Multi-site install on Drupal with 3 sites:

Site 1 is top-level site: site group 1 (id 1, no parent), site org 1 (id 2).
 - CIVICRM_MULTISITE = 1, CIVICRM_DOMAIN_ID = 1, CIVICRM_DOMAIN_GROUP_ID = 1, CIVICRM_DOMAIN_ORG_ID = 2.
Site 2 is a 2nd-level site: site group 2 (id 2, parent 1), site org 2 (id 3).
 - CIVICRM_MULTISITE = 1, CIVICRM_DOMAIN_ID = 2, CIVICRM_DOMAIN_GROUP_ID = 2, CIVICRM_DOMAIN_ORG_ID = 3.
Site 3 is a 2nd-level site: site group 3 (id 3, parent 1), site org 3 (id 4).
 - CIVICRM_MULTISITE = 1, CIVICRM_DOMAIN_ID = 3, CIVICRM_DOMAIN_GROUP_ID = 3, CIVICRM_DOMAIN_ORG_ID = 4.

Everything was done as Drupal uid 1, with the same email address on all 3 sites & so a single Civi record.

The site groups were created automatically, named after civicrm_domain.name, on each site when the first contact was created on that site. I subsequently renamed them, set them as Access Control and specified their org (site org 1/2/3).

I then set up sub-groups under each of these: subgroup 1/2/3 having parent 1/2/3.

During testing I found that searching for contacts in e.g. site group 1 was not retrieving contacts in site group 3, although I'd set up the latter as child of the former. Going to edit site group 3 I found that it no longer showed as having a parent. I set the parent again and saved, which worked. But then after editing the name of the group, the parent was lost again.

Looking at the db, the parents column for site group 3 in civicrm_group was becoming NULL but the children column of site group 1 still included site group 3. civicrm_group_nesting seems correct, it still shows site group 1 as parent of site group 3.

At Deepak's suggestion I emptied civicrm_cache and civicrm_group_nesting. This caused all groups to lose their parent. After re-entering the parents, the problem recurred: editing group name caused parent to be lost again.

Further problem: the parent group select sometimes shows all groups, sometimes only a subset. Currently I can't set the correct parent because it's not one of the choices on offer.

In general though, 3.0 is looking very promising. :)

Dave

davej

  • Ask me questions
  • ****
  • Posts: 404
  • Karma: 21
Re: Editing group removes its parent; parent drop-down has only a subset of groups
August 12, 2009, 09:41:26 am
After more discussions on IRC & testing updates provided by Deepak, this is now looking good. In testing so far of svn rev 23266:

  • Editing a group does not disrupt its parent.
  • The Parent Group select in the Group Settings form now appears to show an appropriate set of candidate parent groups: I believe it's showing all groups minus (self + its direct descendants + its direct ancestors).
  • The parents & children fields in civicrm_group seem to stay consistent with each other & with civicrm_group_nesting.

Good work, Deepak!

Thanks,

Dave J

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Discussion (deprecated) »
  • Alpha and Beta Release Testing »
  • 3.0 Release Testing »
  • Editing group removes its parent; parent drop-down has only a subset of groups

This forum was archived on 2017-11-26.