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) »
  • Feature Requests and Suggestions »
  • Usability Improvements (Moderator: Dave Greenberg) »
  • Show number of members for Groups on Manage Groups
Pages: [1]

Author Topic: Show number of members for Groups on Manage Groups  (Read 2582 times)

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Show number of members for Groups on Manage Groups
May 10, 2009, 10:18:36 pm
Yes I know you need more feature requests like the proverbial hole in the head - and yes I hope we can offer to do this - but the client who would most benefit is back on 2.0 so not much hope there i suspect

but having a count of members (esp now you are caching Smart Groups to some extent) would be an excellent wya of checking for the obvious errors when a Group is just way bigger/smaller then expected
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Show number of members for Groups on Manage Groups
May 10, 2009, 10:33:37 pm
A related piece of the puzzle that may have gotten easier with the caching is being able to show all the Smart Groups a contact is part of - maybe?? Even if not via the Contact's Record - how about somewhere that we could enter the Contact ID and get a read out on all the Smart Groups they are showing up in?

Why am I asking - a person receives an email from an organixsation that often cobbles together lots of SmartGroups when sending out a press release - the Groups are not all listed in the footer for obvious reasons

The person who gets this email asks 'why am I getting this email' - a quick search shows the email when to a combination of 10 Smart Groups.

How can we spot the group that may have been incorrectly set up (not least since the email appears to have gone to ten times more recipients than one would expect - hence the above request for a 'count' mechanism)

(oh but it is good to be off the booksprint and back on to problems ;-)
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

jpcote

  • I’m new here
  • *
  • Posts: 2
  • Karma: 1
  • CiviCRM version: 3.2
  • CMS version: Drupal
  • MySQL version: 5
  • PHP version: 5.2
Re: Show number of members for Groups on Manage Groups
April 28, 2011, 06:50:40 am
We have a client that wants to see how many members are in each group on the Manage Groups page (http://.../civicrm/group&reset=1). Here was the patch:
1. Make sure that paths have been set for templates and custom php (http://.../civicrm/admin/setting/path&reset=1).
2. Place files (CRM/Group/Page/Group.php and templates/CRM/Group/Page/Group.tpl) in the set paths
3. Modify the files:
Group.php
line 354:
$query = "SELECT COUNT(*) as count FROM civicrm_group_contact cgc
  LEFT JOIN civicrm_contact cc ON cgc.contact_id = cc.id
  WHERE cgc.group_id=%1 AND cgc.status='Added'
  AND cc.is_deleted=0;";
$params = array( 1 => array( $object->id, 'Integer' ) );
$dao =& CRM_Core_DAO::executeQuery( $query, $params );
$dao->fetch();
$dao->count;
$values[$object->id]['count'] = $dao->count;

Group.tpl
line 69:
<th>{ts}Contacts{/ts}</th>
line 83:
<td>{$row.count}</td>

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Show number of members for Groups on Manage Groups
April 28, 2011, 01:26:08 pm
Good work for digging out this old post and providing a solution. What versions was your patch applied to?
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

kasiawaka

  • I post occasionally
  • **
  • Posts: 42
  • Karma: 4
    • Kasuwade Solutions Inc.
Re: Show number of members for Groups on Manage Groups
April 29, 2011, 06:44:54 am
That patch jpcote posted was applied to CiviCRM 3.3.5
Kasia Wakarecy
http://kasuwade.ca

DeeFisher

  • I’m new here
  • *
  • Posts: 14
  • Karma: 1
    • New York State Psychological Association
  • CiviCRM version: 4.1.5
  • CMS version: Joomla 2.5.6
  • MySQL version: 5.1.45
  • PHP version: 5.3.10
Re: Show number of members for Groups on Manage Groups
August 09, 2011, 07:22:56 am
Works on 4.0.4 too.  This is something we needed -- thank you!!!

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Show number of members for Groups on Manage Groups
August 09, 2011, 12:48:23 pm
Any chance of this being accepted as a patch to core or does this have significant performance costs?
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Discussion (deprecated) »
  • Feature Requests and Suggestions »
  • Usability Improvements (Moderator: Dave Greenberg) »
  • Show number of members for Groups on Manage Groups

This forum was archived on 2017-11-26.