A CiviCRM extension that provides automated group management with scheduled disable/delete actions, plus comprehensive tracking of group usage in mailings and reminders.
This extension solves a common problem in CiviCRM installations: unused groups consuming system resources, particularly Smart Groups that rebuild cache frequently. When you have hundreds of groups created over the years, many may no longer be actively used but continue to impact performance.
Key Features:
- Scheduled Actions: Set future dates to automatically disable or delete groups
- Mailing Tracking: View which mailings use each group and when they were last sent
- Reminder Tracking: See which scheduled reminders are associated with each group
- Performance Optimization: Reduce system load by automatically managing unused groups
- Safety First: Default action is to disable (not delete) groups to preserve data
Feature | Screenshot |
---|---|
Group Management Interface | ![]() |
Mailing Associations | ![]() |
Reminder Associations | ![]() |
System Status | ![]() |
- PHP: 7.2 or higher
- CiviCRM: 5.38 or higher (tested up to 5.70+)
- Permissions: Users need appropriate CiviCRM permissions for group management
- Navigate to Administer → System Settings → Extensions
- Click Add New and upload the extension package
- Enable the extension
cd <extension-directory>
cv dl com.skvare.managegroup@https://github.com/Skvare/com.skvare.managegroup/archive/master.zip
cv en managegroup
git clone https://github.com/Skvare/com.skvare.managegroup.git
cv en managegroup
- Navigate to Groups: Go to Contacts → Manage Groups
- Edit a Group: Click Settings next to any group
- Configure Scheduling:
- Inactive Date: Set the date and time when the group should be processed
- Inactive Action: Choose between:
- Disable (recommended): Makes the group inactive but preserves all data
- Delete: Permanently removes the group and all associated data
The extension creates a scheduled job that runs daily to process groups with overdue inactive dates.
To configure the scheduled job:
- Navigate to Administer → System Settings → Scheduled Jobs
- Find "Group Action Management" job
- Set appropriate frequency (daily recommended)
- Ensure the job is enabled
- From the Groups list, click Associated Mailings next to any group
- See detailed information about:
- Mailing names and creation dates
- Scheduled and completion dates
- Current mailing status
- How the group was used (include/exclude)
- From the Groups list, click Associated Reminders next to any group
- Review information about:
- Reminder names and types
- Creation and last modification dates
- Last usage dates
- Current reminder status
The extension provides system status checks accessible via Administer → System Settings → System Status:
- Pending Actions: Groups with overdue inactive dates
- Scheduled Actions: Upcoming group actions
- Audit Group Usage: Use the mailing and reminder tracking features to understand group utilization
- Start with Disable: Use the "Disable" action initially rather than "Delete" to maintain data safety
- Plan Timing: Set inactive dates well in advance to allow for final reviews
- Smart Groups with complex criteria benefit most from scheduled management
- Regular cleanup of unused groups can significantly improve system performance
- Monitor system status regularly for pending actions
- Test First: Try the extension in a development environment
- Backup: Always backup your database before bulk group operations
- Use Disable: Prefer disabling over deleting to maintain referential integrity
Groups not being processed
- Verify the scheduled job is enabled and running
- Check system status for any error messages
- Ensure proper permissions are set
Missing menu items
- Clear CiviCRM cache: Administer → System Settings → Cleanup Caches and Update Paths
- Verify extension is properly enabled
Permission errors
- Ensure users have appropriate permissions:
access CiviCRM
for basic functionalityadminister CiviCRM
for group managementaccess CiviMail
for mailing associations
- Documentation: GitHub Repository
- Issues: Report Issues
- Support: Professional support available through Skvare
The extension adds two fields to the civicrm_group
table:
inactive_date
(TIMESTAMP): When the group should be processedinactive_action
(INT): Action to take (1=Disable, 2=Delete)
The extension integrates with CiviCRM's API v3/v4 for:
- Group management operations
- Mailing and reminder queries
- Scheduled job execution
hook_civicrm_buildForm
: Adds fields to group edit formshook_civicrm_links
: Adds action links to group listingshook_civicrm_entityTypes
: Defines custom fieldshook_civicrm_check
: System status integration
This extension is licensed under AGPL-3.0.
- Enhanced UI templates with better styling and user experience
- Improved system status integration
- Updated documentation and screenshots
- Added comprehensive group usage tracking
- Performance optimizations
- Initial release
- Basic scheduled group actions
- Mailing association tracking
Supporting Organizations Skvare
Contact us for support or to learn more about implementing automated group management in your CiviCRM environment.