From 19261bd50855f6db97b5d31d5714a1af64fdbab0 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Fri, 16 Jun 2023 18:48:44 +1200 Subject: [PATCH] dev/core#4213 Make frontend_title, name required for Group entity This follows up on having done this for contribution_page recently. It will mean we can consistently refer to frontend_title in tokens and other places where what we really mean is ... frontend_title. --- .../case_sample.mysql.tpl | 2 +- CRM/Contact/BAO/Group.php | 13 +++++----- CRM/Contact/DAO/Group.php | 18 +++++++++---- CRM/Core/CodeGen/GenerateData.php | 2 +- CRM/Core/I18n/SchemaStructure.php | 6 +++-- CRM/Group/Form/Edit.php | 4 +-- .../Event/BAO/MailingEventUnsubscribe.php | 8 +++--- CRM/Mailing/Form/Subscribe.php | 4 +-- CRM/Upgrade/Incremental/php/FiveSixtyFour.php | 9 +++++++ .../Incremental/sql/5.64.alpha1.mysql.tpl | 21 +++++++++++++++ .../Spec/Provider/TitleFieldSpecProvider.php | 2 +- templates/CRM/Group/Form/Edit.tpl | 26 +++++++++---------- .../SavedSearchDataSets/242_email_on_hold.sql | 2 +- .../251_empty_email_on_hold.sql | 2 +- .../801_pre44_billing_email_smartgroup.sql | 2 +- .../94_legacy_state_province.sql | 2 +- .../primary_multiple_state_province.sql | 2 +- xml/schema/Contact/Group.xml | 7 ++++- xml/templates/case_sample.tpl | 2 +- 19 files changed, 89 insertions(+), 45 deletions(-) diff --git a/CRM/Case/xml/configuration.sample/case_sample.mysql.tpl b/CRM/Case/xml/configuration.sample/case_sample.mysql.tpl index 023f92510dc0..19315e5d7ffb 100644 --- a/CRM/Case/xml/configuration.sample/case_sample.mysql.tpl +++ b/CRM/Case/xml/configuration.sample/case_sample.mysql.tpl @@ -98,4 +98,4 @@ SELECT 'Benefits Specialist is', {localize}'{ts escape="sql"}Benefits Specialist -- * -- *******************************************************/ -INSERT INTO `civicrm_group` ( `name`, {localize field='title'}`title`{/localize}, `description`, `source`, `saved_search_id`, `is_active`, `visibility`, `where_clause`, `select_tables`, `where_tables`, `group_type`, `cache_date`, `parents`, `children`, `is_hidden` ) (SELECT 'Case_Resources', {localize}'{ts escape="sql"}Case Resources{/ts}'{/localize}, 'Contacts in this group are listed with their phone number and email when viewing case. You also can send copies of case activities to these contacts.', NULL, NULL, 1, 'User and User Admin Only', ' ( `civicrm_group_contact-5`.group_id IN ( 5 ) AND `civicrm_group_contact-5`.status IN ("Added") ) ', '{literal}a:10:{s:15:"civicrm_contact";i:1;s:15:"civicrm_address";i:1;s:22:"civicrm_state_province";i:1;s:15:"civicrm_country";i:1;s:13:"civicrm_email";i:1;s:13:"civicrm_phone";i:1;s:10:"civicrm_im";i:1;s:19:"civicrm_worldregion";i:1;s:25:"`civicrm_group_contact-5`";s:114:" LEFT JOIN civicrm_group_contact `civicrm_group_contact-5` ON contact_a.id = `civicrm_group_contact-5`.contact_id ";s:6:"gender";i:1;}{/literal}', '{literal}a:2:{s:15:"civicrm_contact";i:1;s:25:"`civicrm_group_contact-5`";s:114:" LEFT JOIN civicrm_group_contact `civicrm_group_contact-5` ON contact_a.id = `civicrm_group_contact-5`.contact_id ";}{/literal}', '2', NULL, NULL, NULL, 0 FROM dual WHERE NOT EXISTS (SELECT * FROM `civicrm_group` WHERE `name` = 'Case_Resources')); +INSERT INTO `civicrm_group` ( `name`, {localize field='title'}`title`{/localize},{localize field='frontend_title'}`frontend_title`{/localize}, `description`, `source`, `saved_search_id`, `is_active`, `visibility`, `where_clause`, `select_tables`, `where_tables`, `group_type`, `cache_date`, `parents`, `children`, `is_hidden` ) (SELECT 'Case_Resources', {localize}'{ts escape="sql"}Case Resources{/ts}'{/localize},{localize}'{ts escape="sql"}Case Resources{/ts}'{/localize}, 'Contacts in this group are listed with their phone number and email when viewing case. You also can send copies of case activities to these contacts.', NULL, NULL, 1, 'User and User Admin Only', ' ( `civicrm_group_contact-5`.group_id IN ( 5 ) AND `civicrm_group_contact-5`.status IN ("Added") ) ', '{literal}a:10:{s:15:"civicrm_contact";i:1;s:15:"civicrm_address";i:1;s:22:"civicrm_state_province";i:1;s:15:"civicrm_country";i:1;s:13:"civicrm_email";i:1;s:13:"civicrm_phone";i:1;s:10:"civicrm_im";i:1;s:19:"civicrm_worldregion";i:1;s:25:"`civicrm_group_contact-5`";s:114:" LEFT JOIN civicrm_group_contact `civicrm_group_contact-5` ON contact_a.id = `civicrm_group_contact-5`.contact_id ";s:6:"gender";i:1;}{/literal}', '{literal}a:2:{s:15:"civicrm_contact";i:1;s:25:"`civicrm_group_contact-5`";s:114:" LEFT JOIN civicrm_group_contact `civicrm_group_contact-5` ON contact_a.id = `civicrm_group_contact-5`.contact_id ";}{/literal}', '2', NULL, NULL, NULL, 0 FROM dual WHERE NOT EXISTS (SELECT * FROM `civicrm_group` WHERE `name` = 'Case_Resources')); diff --git a/CRM/Contact/BAO/Group.php b/CRM/Contact/BAO/Group.php index 746bd0179881..bae3afa1aee7 100644 --- a/CRM/Contact/BAO/Group.php +++ b/CRM/Contact/BAO/Group.php @@ -342,6 +342,11 @@ public static function create(&$params) { 'parents' => NULL, ]; + if (empty($params['id']) && empty($params['frontend_title'])) { + // If we were calling writeRecord it would handle this, but we need + // to migrate the other bits of magic. + $params['frontend_title'] = $params['title']; + } $hook = empty($params['id']) ? 'create' : 'edit'; CRM_Utils_Hook::pre($hook, 'Group', $params['id'] ?? NULL, $params); @@ -1091,12 +1096,8 @@ public static function getGroupsHierarchy( $title = $dao->title; $description = $dao->description; if ($public) { - if (!empty($dao->frontend_title)) { - $title = $dao->frontend_title; - } - if (!empty($dao->frontend_description)) { - $description = $dao->frontend_description; - } + $title = $dao->frontend_title; + $description = $dao->frontend_description; } if ($dao->parents) { $parentArray = explode(',', $dao->parents); diff --git a/CRM/Contact/DAO/Group.php b/CRM/Contact/DAO/Group.php index 9eaf90901f78..4c7c1c6eb71d 100644 --- a/CRM/Contact/DAO/Group.php +++ b/CRM/Contact/DAO/Group.php @@ -6,7 +6,7 @@ * * Generated from xml/schema/CRM/Contact/Group.xml * DO NOT EDIT. Generated by CRM_Core_CodeGen - * (GenCodeChecksum:e98767d560ee98268e800a2aec983cea) + * (GenCodeChecksum:5cb6d58b6f91122093003d8c0db4fab1) */ /** @@ -68,7 +68,7 @@ class CRM_Contact_DAO_Group extends CRM_Core_DAO { /** * Internal name of Group. * - * @var string|null + * @var string * (SQL type: varchar(64)) * Note that values will be retrieved from the database as a string. */ @@ -77,7 +77,7 @@ class CRM_Contact_DAO_Group extends CRM_Core_DAO { /** * Name of Group. * - * @var string|null + * @var string * (SQL type: varchar(255)) * Note that values will be retrieved from the database as a string. */ @@ -134,6 +134,7 @@ class CRM_Contact_DAO_Group extends CRM_Core_DAO { * @var string|null * (SQL type: text) * Note that values will be retrieved from the database as a string. + * @deprecated */ public $where_clause; @@ -143,6 +144,7 @@ class CRM_Contact_DAO_Group extends CRM_Core_DAO { * @var string|null * (SQL type: text) * Note that values will be retrieved from the database as a string. + * @deprecated */ public $select_tables; @@ -152,6 +154,7 @@ class CRM_Contact_DAO_Group extends CRM_Core_DAO { * @var string|null * (SQL type: text) * Note that values will be retrieved from the database as a string. + * @deprecated */ public $where_tables; @@ -238,7 +241,7 @@ class CRM_Contact_DAO_Group extends CRM_Core_DAO { /** * Alternative public title for this Group. * - * @var string|null + * @var string * (SQL type: varchar(255)) * Note that values will be retrieved from the database as a string. */ @@ -324,6 +327,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Group Name'), 'description' => ts('Internal name of Group.'), + 'required' => TRUE, 'maxlength' => 64, 'size' => CRM_Utils_Type::BIG, 'usage' => [ @@ -344,6 +348,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Group Title'), 'description' => ts('Name of Group.'), + 'required' => TRUE, 'maxlength' => 255, 'size' => CRM_Utils_Type::HUGE, 'usage' => [ @@ -494,6 +499,7 @@ public static function &fields() { 'entity' => 'Group', 'bao' => 'CRM_Contact_BAO_Group', 'localizable' => 0, + 'deprecated' => TRUE, 'readonly' => TRUE, 'add' => '1.6', ], @@ -514,6 +520,7 @@ public static function &fields() { 'bao' => 'CRM_Contact_BAO_Group', 'localizable' => 0, 'serialize' => self::SERIALIZE_PHP, + 'deprecated' => TRUE, 'readonly' => TRUE, 'add' => '1.6', ], @@ -534,6 +541,7 @@ public static function &fields() { 'bao' => 'CRM_Contact_BAO_Group', 'localizable' => 0, 'serialize' => self::SERIALIZE_PHP, + 'deprecated' => TRUE, 'readonly' => TRUE, 'add' => '1.6', ], @@ -756,6 +764,7 @@ public static function &fields() { 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Public Group Title'), 'description' => ts('Alternative public title for this Group.'), + 'required' => TRUE, 'maxlength' => 255, 'size' => CRM_Utils_Type::HUGE, 'usage' => [ @@ -765,7 +774,6 @@ public static function &fields() { 'token' => FALSE, ], 'where' => 'civicrm_group.frontend_title', - 'default' => NULL, 'table_name' => 'civicrm_group', 'entity' => 'Group', 'bao' => 'CRM_Contact_BAO_Group', diff --git a/CRM/Core/CodeGen/GenerateData.php b/CRM/Core/CodeGen/GenerateData.php index 94eb6aa00840..e4a861c9ad0c 100644 --- a/CRM/Core/CodeGen/GenerateData.php +++ b/CRM/Core/CodeGen/GenerateData.php @@ -1141,7 +1141,7 @@ private function addGroup() { // add the 3 groups first foreach ($this->sampleData['group'] as $groupName) { $group = new CRM_Contact_BAO_Group(); - $group->name = $group->title = $groupName; + $group->name = $group->title = $group->frontend_title = $groupName; $group->group_type = "12"; $group->visibility = 'Public Pages'; $group->is_active = 1; diff --git a/CRM/Core/I18n/SchemaStructure.php b/CRM/Core/I18n/SchemaStructure.php index efd06caa5bfd..d79f2493dd64 100644 --- a/CRM/Core/I18n/SchemaStructure.php +++ b/CRM/Core/I18n/SchemaStructure.php @@ -92,8 +92,8 @@ public static function &columns() { 'description' => "text COMMENT 'Optional description.'", ], 'civicrm_group' => [ - 'title' => "varchar(255) COMMENT 'Name of Group.'", - 'frontend_title' => "varchar(255) DEFAULT NULL COMMENT 'Alternative public title for this Group.'", + 'title' => "varchar(255) NOT NULL COMMENT 'Name of Group.'", + 'frontend_title' => "varchar(255) NOT NULL COMMENT 'Alternative public title for this Group.'", 'frontend_description' => "text DEFAULT NULL COMMENT 'Alternative public description of the group.'", ], 'civicrm_contribution_page' => [ @@ -416,9 +416,11 @@ public static function &widgets() { 'civicrm_group' => [ 'title' => [ 'type' => "Text", + 'required' => "true", ], 'frontend_title' => [ 'type' => "Text", + 'required' => "TRUE", ], 'frontend_description' => [ 'type' => "TextArea", diff --git a/CRM/Group/Form/Edit.php b/CRM/Group/Form/Edit.php index 120af8822d3b..540c6c243b85 100644 --- a/CRM/Group/Form/Edit.php +++ b/CRM/Group/Form/Edit.php @@ -62,13 +62,13 @@ class CRM_Group_Form_Edit extends CRM_Core_Form { */ protected function setEntityFields() { $this->entityFields = [ + 'frontend_title' => ['name' => 'frontend_title', 'required' => TRUE], + 'frontend_description' => ['name' => 'frontend_description'], 'title' => [ 'name' => 'title', 'required' => TRUE, ], 'description' => ['name' => 'description'], - 'frontend_title' => ['name' => 'frontend_title'], - 'frontend_description' => ['name' => 'frontend_description'], ]; } diff --git a/CRM/Mailing/Event/BAO/MailingEventUnsubscribe.php b/CRM/Mailing/Event/BAO/MailingEventUnsubscribe.php index 7afd235ef45e..498f7df9360d 100644 --- a/CRM/Mailing/Event/BAO/MailingEventUnsubscribe.php +++ b/CRM/Mailing/Event/BAO/MailingEventUnsubscribe.php @@ -278,18 +278,18 @@ public static function unsub_from_mailing($job_id, $queue_id, $hash, $return = F } while ($doAdded->fetch()) { $returnGroups[$doAdded->group_id] = [ - 'title' => !empty($doAdded->frontend_title) ? $doAdded->frontend_title : $doAdded->title, - 'description' => !empty($doAdded->frontend_description) ? $doAdded->frontend_description : $doAdded->description, + 'title' => $doAdded->frontend_title, + 'description' => $doAdded->frontend_description, ]; } return $returnGroups; } else { while ($doCached->fetch()) { - $groups[$doCached->group_id] = !empty($doCached->frontend_title) ? $doCached->frontend_title : $doCached->title; + $groups[$doCached->group_id] = $doCached->frontend_title; } while ($doAdded->fetch()) { - $groups[$doAdded->group_id] = !empty($doAdded->frontend_title) ? $doAdded->frontend_title : $doAdded->title; + $groups[$doAdded->group_id] = $doAdded->frontend_title; } } $transaction = new CRM_Core_Transaction(); diff --git a/CRM/Mailing/Form/Subscribe.php b/CRM/Mailing/Form/Subscribe.php index 8d708002e7fe..3a7f46c3cf2d 100644 --- a/CRM/Mailing/Form/Subscribe.php +++ b/CRM/Mailing/Form/Subscribe.php @@ -89,8 +89,8 @@ public function buildQuickForm() { while ($dao->fetch()) { $row = []; $row['id'] = $dao->id; - $row['title'] = $dao->frontend_title ?? $dao->title; - $row['description'] = $dao->frontend_description ?? $dao->description; + $row['title'] = $dao->frontend_title; + $row['description'] = $dao->frontend_description; $row['checkbox'] = CRM_Core_Form::CB_PREFIX . $row['id']; $this->addElement('checkbox', $row['checkbox'], diff --git a/CRM/Upgrade/Incremental/php/FiveSixtyFour.php b/CRM/Upgrade/Incremental/php/FiveSixtyFour.php index 10d18a85d0b9..0af4778a6212 100644 --- a/CRM/Upgrade/Incremental/php/FiveSixtyFour.php +++ b/CRM/Upgrade/Incremental/php/FiveSixtyFour.php @@ -32,8 +32,17 @@ public function upgrade_5_64_alpha1($rev): void { $this->addTask(ts('Upgrade DB to %1: SQL', [1 => $rev]), 'runSql', $rev); $this->addTask('Update post_URL/cancel_URL in logging tables', 'updateLogging'); $this->addTask('Add in Everybody ACL Role option value', 'addEveryBodyAclOptionValue'); + $this->addTask('Make Group.name required', 'alterColumn', 'civicrm_group', 'name', "varchar(255) NOT NULL COMMENT 'Unique name for identifying contribution page'"); + $this->addTask('Make Group.title required', 'alterColumn', 'civicrm_group', 'title', "varchar(255) NOT NULL COMMENT 'Contribution Page title. For top of page display'", TRUE); + $this->addTask('Make Group.frontend_title required', 'alterColumn', 'civicrm_group', 'frontend_title', "varchar(255) NOT NULL COMMENT 'Contribution Page Public title'", TRUE); } + /** + * @param $ctx + * + * @return bool + * @throws \Civi\Core\Exception\DBQueryException + */ public static function updateLogging($ctx): bool { if (\Civi::settings()->get('logging')) { $dsn = defined('CIVICRM_LOGGING_DSN') ? CRM_Utils_SQL::autoSwitchDSN(CIVICRM_LOGGING_DSN) : CRM_Utils_SQL::autoSwitchDSN(CIVICRM_DSN); diff --git a/CRM/Upgrade/Incremental/sql/5.64.alpha1.mysql.tpl b/CRM/Upgrade/Incremental/sql/5.64.alpha1.mysql.tpl index d44f0b8c4fcd..9f793cc0a19e 100644 --- a/CRM/Upgrade/Incremental/sql/5.64.alpha1.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/5.64.alpha1.mysql.tpl @@ -15,3 +15,24 @@ ALTER TABLE civicrm_uf_group CHANGE `post_URL` `post_url` varchar(255) DEFAULT NULL COMMENT 'Redirect to URL on submit.', CHANGE `cancel_URL` `cancel_url` varchar(255) DEFAULT NULL COMMENT 'Redirect to URL when Cancel button clicked.' ; + +-- Ensure new name field is not null/unique. Setting to ID is a bit lazy - but it works. +UPDATE civicrm_group SET `name` = `id` WHERE name IS NULL; + +-- Add name field, make frontend_title required (in conjunction with php function) +{if $multilingual} + {foreach from=$locales item=locale} + UPDATE `civicrm_group` + SET `frontend_title_{$locale}` = `title_{$locale}`, + `frontend_description_{$locale}` = `description_{$locale}` + WHERE `frontend_description_{$locale}` IS NULL OR `frontend_description_{$locale}` = ''; + {/foreach} +{else} + UPDATE `civicrm_group` + SET `frontend_title` = `title` + WHERE `frontend_title` IS NULL OR `frontend_title` = ''; + + UPDATE `civicrm_group` + SET `frontend_description` = `description` + WHERE `frontend_description` IS NULL OR `frontend_description` = '' AND description <> ''; +{/if} diff --git a/Civi/Api4/Service/Spec/Provider/TitleFieldSpecProvider.php b/Civi/Api4/Service/Spec/Provider/TitleFieldSpecProvider.php index 4b5810e93790..d284cd3f38b2 100644 --- a/Civi/Api4/Service/Spec/Provider/TitleFieldSpecProvider.php +++ b/Civi/Api4/Service/Spec/Provider/TitleFieldSpecProvider.php @@ -44,7 +44,7 @@ public function modifySpec(RequestSpec $spec): void { * @inheritDoc */ public function applies($entity, $action): bool { - return in_array($entity, ['PaymentProcessor', 'ContributionPage']) && $action === 'create'; + return in_array($entity, ['PaymentProcessor', 'ContributionPage', 'Group']) && $action === 'create'; } } diff --git a/templates/CRM/Group/Form/Edit.tpl b/templates/CRM/Group/Form/Edit.tpl index 41576a9f5273..716bd6f6615c 100644 --- a/templates/CRM/Group/Form/Edit.tpl +++ b/templates/CRM/Group/Form/Edit.tpl @@ -22,24 +22,11 @@
{include file="CRM/common/formButtons.tpl" location="top"}
- - - - - - - - - - - @@ -47,6 +34,17 @@ + + + + + + + + + {if !empty($form.group_type)} diff --git a/tests/phpunit/CRM/Contact/BAO/SavedSearchDataSets/242_email_on_hold.sql b/tests/phpunit/CRM/Contact/BAO/SavedSearchDataSets/242_email_on_hold.sql index ec65882e3826..cea3d7e1e479 100644 --- a/tests/phpunit/CRM/Contact/BAO/SavedSearchDataSets/242_email_on_hold.sql +++ b/tests/phpunit/CRM/Contact/BAO/SavedSearchDataSets/242_email_on_hold.sql @@ -5,4 +5,4 @@ INSERT INTO `civicrm_mapping_field` (`id`, `mapping_id`, `name`, `contact_type`, INSERT INTO `civicrm_saved_search` (`id`, `form_values`, `mapping_id`, `search_custom_id`) VALUES (75, 'a:7:{s:5:"qfKey";s:32:"30ba24b74dd8ceb5710384b962004599";s:6:"mapper";a:2:{i:1;a:2:{i:0;a:3:{i:0;s:10:"Individual";i:1;s:5:"email";i:2;s:1:" ";}i:1;a:3:{i:0;s:10:"Individual";i:1;s:7:"on_hold";i:2;s:1:" ";}}i:2;a:1:{i:0;a:1:{i:0;s:0:"";}}}s:8:"operator";a:2:{i:1;a:2:{i:0;s:11:"IS NOT NULL";i:1;s:1:"=";}i:2;a:1:{i:0;s:0:"";}}s:5:"value";a:2:{i:1;a:2:{i:0;s:0:"";i:1;s:1:"1";}i:2;a:1:{i:0;s:0:"";}}s:4:"task";s:2:"13";s:8:"radio_ts";s:6:"ts_all";s:11:"uf_group_id";s:0:"";}', 149, NULL); -INSERT INTO `civicrm_group` (`id`, `name`, `title`, `description`, `source`, `saved_search_id`, `is_active`, `visibility`, `where_clause`, `select_tables`, `where_tables`, `group_type`, `cache_date`, `refresh_date`, `parents`, `children`, `is_hidden`, `is_reserved`, `created_id`) VALUES (242, '_Integrity__emails_on_hold', '@ Integrity - emails on hold', NULL, NULL, 75, 1, 'User and User Admin Only', ' ( `civicrm_group_contact_cache_242`.group_id = 242 ) ', 'a:10:{s:15:"civicrm_contact";i:1;s:15:"civicrm_address";i:1;s:22:"civicrm_state_province";i:1;s:15:"civicrm_country";i:1;s:13:"civicrm_email";i:1;s:13:"civicrm_phone";i:1;s:10:"civicrm_im";i:1;s:19:"civicrm_worldregion";i:1;s:33:"`civicrm_group_contact_cache_242`";s:136:" LEFT JOIN civicrm_group_contact_cache `civicrm_group_contact_cache_242` ON contact_a.id = `civicrm_group_contact_cache_242`.contact_id ";s:6:"gender";i:1;}', 'a:2:{s:15:"civicrm_contact";i:1;s:33:"`civicrm_group_contact_cache_242`";s:136:" LEFT JOIN civicrm_group_contact_cache `civicrm_group_contact_cache_242` ON contact_a.id = `civicrm_group_contact_cache_242`.contact_id ";}', NULL, NULL, NULL, NULL, NULL, 0, 0, NULL); +INSERT INTO `civicrm_group` (`id`, `name`, `title`, `frontend_title`, `description`, `source`, `saved_search_id`, `is_active`, `visibility`, `where_clause`, `select_tables`, `where_tables`, `group_type`, `cache_date`, `refresh_date`, `parents`, `children`, `is_hidden`, `is_reserved`, `created_id`) VALUES (242, '_Integrity__emails_on_hold', '@ Integrity - emails on hold','@ Integrity - emails on hold', NULL, NULL, 75, 1, 'User and User Admin Only', ' ( `civicrm_group_contact_cache_242`.group_id = 242 ) ', 'a:10:{s:15:"civicrm_contact";i:1;s:15:"civicrm_address";i:1;s:22:"civicrm_state_province";i:1;s:15:"civicrm_country";i:1;s:13:"civicrm_email";i:1;s:13:"civicrm_phone";i:1;s:10:"civicrm_im";i:1;s:19:"civicrm_worldregion";i:1;s:33:"`civicrm_group_contact_cache_242`";s:136:" LEFT JOIN civicrm_group_contact_cache `civicrm_group_contact_cache_242` ON contact_a.id = `civicrm_group_contact_cache_242`.contact_id ";s:6:"gender";i:1;}', 'a:2:{s:15:"civicrm_contact";i:1;s:33:"`civicrm_group_contact_cache_242`";s:136:" LEFT JOIN civicrm_group_contact_cache `civicrm_group_contact_cache_242` ON contact_a.id = `civicrm_group_contact_cache_242`.contact_id ";}', NULL, NULL, NULL, NULL, NULL, 0, 0, NULL); diff --git a/tests/phpunit/CRM/Contact/BAO/SavedSearchDataSets/251_empty_email_on_hold.sql b/tests/phpunit/CRM/Contact/BAO/SavedSearchDataSets/251_empty_email_on_hold.sql index 780bc171d311..0319f36b8666 100644 --- a/tests/phpunit/CRM/Contact/BAO/SavedSearchDataSets/251_empty_email_on_hold.sql +++ b/tests/phpunit/CRM/Contact/BAO/SavedSearchDataSets/251_empty_email_on_hold.sql @@ -1,3 +1,3 @@ INSERT INTO `civicrm_saved_search` (`id`, `form_values`, `mapping_id`, `search_custom_id`) VALUES (77, 'a:58:{s:5:"qfKey";s:37:"27e1084e725e5a1d4335639ceb45e4bc_3852";s:12:"hidden_basic";s:1:"1";s:12:"contact_type";a:0:{}s:5:"group";a:0:{}s:10:"group_type";a:0:{}s:21:"group_search_selected";s:5:"group";s:12:"contact_tags";a:0:{}s:9:"sort_name";s:0:"";s:5:"email";s:0:"";s:14:"contact_source";s:0:"";s:9:"job_title";s:0:"";s:10:"contact_id";s:0:"";s:19:"external_identifier";s:0:"";s:7:"uf_user";s:0:"";s:10:"tag_search";s:0:"";s:11:"uf_group_id";s:0:"";s:14:"component_mode";s:1:"1";s:8:"operator";s:3:"AND";s:25:"display_relationship_type";s:0:"";s:15:"privacy_options";a:0:{}s:16:"privacy_operator";s:3:"AND";s:14:"privacy_toggle";s:1:"1";s:13:"email_on_hold";a:1:{s:7:"on_hold";N;}s:30:"preferred_communication_method";a:6:{i:1;s:0:"";i:2;s:0:"";i:3;s:0:"";i:4;s:0:"";i:5;s:0:"";i:6;s:0:"";}s:18:"preferred_language";s:0:"";s:13:"phone_numeric";s:0:"";s:22:"phone_location_type_id";s:0:"";s:19:"phone_phone_type_id";s:0:"";s:15:"hidden_location";s:1:"1";s:14:"street_address";s:0:"";s:15:"postal_code_low";s:0:"";s:16:"postal_code_high";s:0:"";s:4:"city";s:0:"";s:11:"postal_code";s:0:"";s:14:"state_province";a:1:{i:0;s:4:"1641";}s:7:"country";s:0:"";s:13:"prox_distance";s:0:"";s:18:"prox_distance_unit";s:5:"miles";s:12:"world_region";s:0:"";s:21:"hidden_CiviContribute";s:1:"1";s:19:"contribution_source";s:0:"";s:21:"contribution_date_low";s:0:"";s:22:"contribution_date_high";s:0:"";s:23:"contribution_amount_low";s:0:"";s:24:"contribution_amount_high";s:0:"";s:22:"contribution_status_id";a:0:{}s:38:"contribution_thankyou_date_is_not_null";s:0:"";s:37:"contribution_receipt_date_is_not_null";s:0:"";s:24:"contribution_in_honor_of";s:0:"";s:22:"contribution_pay_later";s:0:"";s:22:"contribution_recurring";s:0:"";s:17:"contribution_test";s:0:"";s:27:"contribution_transaction_id";s:0:"";s:25:"contribution_check_number";s:0:"";s:32:"contribution_pcp_display_in_roll";s:0:"";s:24:"contribution_campaign_id";a:0:{}s:4:"task";s:2:"14";s:8:"radio_ts";s:6:"ts_all";}', NULL, NULL); -INSERT INTO `civicrm_group` (`id`, `name`, `title`, `description`, `source`, `saved_search_id`, `is_active`, `visibility`, `where_clause`, `select_tables`, `where_tables`, `group_type`, `cache_date`, `refresh_date`, `parents`, `children`, `is_hidden`, `is_reserved`, `created_id`) VALUES (251, 'Qld_All', 'Qld All', 'All contacts with Qld as the State', NULL, 77, 1, 'User and User Admin Only', ' ( `civicrm_group_contact_cache_251`.group_id = 251 ) ', 'a:8:{s:15:"civicrm_contact";i:1;s:15:"civicrm_address";i:1;s:15:"civicrm_country";i:1;s:13:"civicrm_email";i:1;s:13:"civicrm_phone";i:1;s:10:"civicrm_im";i:1;s:19:"civicrm_worldregion";i:1;s:33:"`civicrm_group_contact_cache_251`";s:136:" LEFT JOIN civicrm_group_contact_cache `civicrm_group_contact_cache_251` ON contact_a.id = `civicrm_group_contact_cache_251`.contact_id ";}', 'a:2:{s:15:"civicrm_contact";i:1;s:33:"`civicrm_group_contact_cache_251`";s:136:" LEFT JOIN civicrm_group_contact_cache `civicrm_group_contact_cache_251` ON contact_a.id = `civicrm_group_contact_cache_251`.contact_id ";}', NULL, NULL, NULL, NULL, NULL, 0, 0, NULL); +INSERT INTO `civicrm_group` (`id`, `name`, `title`, `frontend_title`, `description`, `source`, `saved_search_id`, `is_active`, `visibility`, `where_clause`, `select_tables`, `where_tables`, `group_type`, `cache_date`, `refresh_date`, `parents`, `children`, `is_hidden`, `is_reserved`, `created_id`) VALUES (251, 'Qld_All', 'Qld All', 'Qld All', 'All contacts with Qld as the State', NULL, 77, 1, 'User and User Admin Only', ' ( `civicrm_group_contact_cache_251`.group_id = 251 ) ', 'a:8:{s:15:"civicrm_contact";i:1;s:15:"civicrm_address";i:1;s:15:"civicrm_country";i:1;s:13:"civicrm_email";i:1;s:13:"civicrm_phone";i:1;s:10:"civicrm_im";i:1;s:19:"civicrm_worldregion";i:1;s:33:"`civicrm_group_contact_cache_251`";s:136:" LEFT JOIN civicrm_group_contact_cache `civicrm_group_contact_cache_251` ON contact_a.id = `civicrm_group_contact_cache_251`.contact_id ";}', 'a:2:{s:15:"civicrm_contact";i:1;s:33:"`civicrm_group_contact_cache_251`";s:136:" LEFT JOIN civicrm_group_contact_cache `civicrm_group_contact_cache_251` ON contact_a.id = `civicrm_group_contact_cache_251`.contact_id ";}', NULL, NULL, NULL, NULL, NULL, 0, 0, NULL); diff --git a/tests/phpunit/CRM/Contact/BAO/SavedSearchDataSets/801_pre44_billing_email_smartgroup.sql b/tests/phpunit/CRM/Contact/BAO/SavedSearchDataSets/801_pre44_billing_email_smartgroup.sql index 48171d8d9b70..89e1fd3de249 100644 --- a/tests/phpunit/CRM/Contact/BAO/SavedSearchDataSets/801_pre44_billing_email_smartgroup.sql +++ b/tests/phpunit/CRM/Contact/BAO/SavedSearchDataSets/801_pre44_billing_email_smartgroup.sql @@ -9,5 +9,5 @@ INSERT IGNORE INTO `civicrm_mapping_field` (`id`, `mapping_id`, `name`, `contact INSERT IGNORE INTO `civicrm_saved_search` (`id`, `form_values`, `mapping_id`, `search_custom_id`) VALUES (286, 'a:8:{s:5:"qfKey";s:37:"92bf8874b4cd856436833fba5526a10f_9684";s:6:"mapper";a:2:{i:1;a:5:{i:0;a:3:{i:0;s:10:"Individual";i:1;s:5:"email";i:2;s:1:"5";}i:1;a:2:{i:0;s:10:"Individual";i:1;s:12:"do_not_email";}i:2;a:3:{i:0;s:10:"Individual";i:1;s:14:"state_province";i:2;s:1:"5";}i:3;a:2:{i:0;s:10:"Individual";i:1;s:10:"is_opt_out";}i:4;a:3:{i:0;s:10:"Individual";i:1;s:7:"on_hold";i:2;s:1:"5";}}i:2;a:1:{i:0;a:1:{i:0;s:0:"";}}}s:8:"operator";a:2:{i:1;a:5:{i:0;s:11:"IS NOT NULL";i:1;s:1:"=";i:2;s:1:"=";i:3;s:1:"=";i:4;s:1:"=";}i:2;a:1:{i:0;s:0:"";}}s:5:"value";a:2:{i:1;a:5:{i:0;s:0:"";i:1;s:1:"0";i:2;s:5:"Idaho";i:3;s:1:"0";i:4;s:1:"0";}i:2;a:1:{i:0;s:0:"";}}s:4:"task";s:2:"13";s:8:"radio_ts";s:6:"ts_all";s:11:"uf_group_id";s:0:"";s:14:"component_mode";i:1;}', 315, NULL); -INSERT IGNORE INTO `civicrm_group` (`id`, `name`, `title`, `description`, `source`, `saved_search_id`, `is_active`, `visibility`, `where_clause`, `select_tables`, `where_tables`, `group_type`, `cache_date`, `refresh_date`, `parents`, `children`, `is_hidden`, `is_reserved`, `created_id`) VALUES (801, 'Idaho EmailContacts', 'Idaho Email Contacts', NULL, NULL, 286, 1, 'User and User Admin Only', ' ( `civicrm_group_contact_cache_801`.group_id = 801 ) ', 'a:12:{s:15:"civicrm_contact";i:1;s:15:"civicrm_address";i:1;s:22:"civicrm_state_province";i:1;s:15:"civicrm_country";i:1;s:13:"civicrm_email";i:1;s:13:"civicrm_phone";i:1;s:10:"civicrm_im";i:1;s:19:"civicrm_worldregion";i:1;s:33:"`civicrm_group_contact_cache_801`";s:136:" LEFT JOIN civicrm_group_contact_cache `civicrm_group_contact_cache_801` ON contact_a.id = `civicrm_group_contact_cache_801`.contact_id ";s:6:"gender";i:1;s:17:"individual_prefix";i:1;s:17:"individual_suffix";i:1;}', 'a:2:{s:15:"civicrm_contact";i:1;s:33:"`civicrm_group_contact_cache_801`";s:136:" LEFT JOIN civicrm_group_contact_cache `civicrm_group_contact_cache_801` ON contact_a.id = `civicrm_group_contact_cache_801`.contact_id ";}', '2', '2014-06-26 03:31:03', NULL, NULL, NULL, 0, 0, NULL); +INSERT IGNORE INTO `civicrm_group` (`id`, `name`, `title`, `frontend_title`, `description`, `source`, `saved_search_id`, `is_active`, `visibility`, `where_clause`, `select_tables`, `where_tables`, `group_type`, `cache_date`, `refresh_date`, `parents`, `children`, `is_hidden`, `is_reserved`, `created_id`) VALUES (801, 'Idaho EmailContacts', 'Idaho Email Contacts', 'Idaho Email Contacts', NULL, NULL, 286, 1, 'User and User Admin Only', ' ( `civicrm_group_contact_cache_801`.group_id = 801 ) ', 'a:12:{s:15:"civicrm_contact";i:1;s:15:"civicrm_address";i:1;s:22:"civicrm_state_province";i:1;s:15:"civicrm_country";i:1;s:13:"civicrm_email";i:1;s:13:"civicrm_phone";i:1;s:10:"civicrm_im";i:1;s:19:"civicrm_worldregion";i:1;s:33:"`civicrm_group_contact_cache_801`";s:136:" LEFT JOIN civicrm_group_contact_cache `civicrm_group_contact_cache_801` ON contact_a.id = `civicrm_group_contact_cache_801`.contact_id ";s:6:"gender";i:1;s:17:"individual_prefix";i:1;s:17:"individual_suffix";i:1;}', 'a:2:{s:15:"civicrm_contact";i:1;s:33:"`civicrm_group_contact_cache_801`";s:136:" LEFT JOIN civicrm_group_contact_cache `civicrm_group_contact_cache_801` ON contact_a.id = `civicrm_group_contact_cache_801`.contact_id ";}', '2', '2014-06-26 03:31:03', NULL, NULL, NULL, 0, 0, NULL); diff --git a/tests/phpunit/CRM/Contact/BAO/SavedSearchDataSets/94_legacy_state_province.sql b/tests/phpunit/CRM/Contact/BAO/SavedSearchDataSets/94_legacy_state_province.sql index 107518f40410..c11d1091da40 100644 --- a/tests/phpunit/CRM/Contact/BAO/SavedSearchDataSets/94_legacy_state_province.sql +++ b/tests/phpunit/CRM/Contact/BAO/SavedSearchDataSets/94_legacy_state_province.sql @@ -8,4 +8,4 @@ INSERT INTO `civicrm_mapping_field` (`id`, `mapping_id`, `name`, `contact_type`, (2845, 113, 'state_province', 'Individual', 4, NULL, NULL, NULL, NULL, NULL, 1, '=', 'New York', NULL); INSERT INTO `civicrm_saved_search` (`id`, `form_values`, `mapping_id`, `search_custom_id`) VALUES (38, 'a:6:{s:6:"mapper";a:2:{i:1;a:5:{i:0;a:3:{i:0;s:10:"Individual";i:1;s:5:"email";i:2;s:1:" ";}i:1;a:2:{i:0;s:10:"Individual";i:1;s:12:"do_not_email";}i:2;a:2:{i:0;s:10:"Individual";i:1;s:10:"is_opt_out";}i:3;a:2:{i:0;s:10:"Individual";i:1;s:10:"first_name";}i:4;a:3:{i:0;s:10:"Individual";i:1;s:14:"state_province";i:2;s:1:" ";}}i:2;a:1:{i:0;a:1:{i:0;s:0:"";}}}s:8:"operator";a:2:{i:1;a:5:{i:0;s:11:"IS NOT NULL";i:1;s:2:"!=";i:2;s:2:"!=";i:3;s:11:"IS NOT NULL";i:4;s:1:"=";}i:2;a:1:{i:0;s:0:"";}}s:5:"value";a:2:{i:1;a:5:{i:0;s:0:"";i:1;s:1:"1";i:2;s:1:"1";i:3;s:0:"";i:4;s:8:"New York";}i:2;a:1:{i:0;s:0:"";}}s:4:"task";s:2:"13";s:8:"radio_ts";s:6:"ts_all";s:11:"uf_group_id";s:0:"";}', '113', NULL); -INSERT INTO `civicrm_group` (`id`, `name`, `title`, `description`, `source`, `saved_search_id`, `is_active`, `visibility`, `where_clause`, `select_tables`, `where_tables`, `group_type`, `cache_date`, `refresh_date`, `parents`, `children`, `is_hidden`, `is_reserved`, `created_id`) VALUES (94, '_null_streets', '@ null streets', NULL, NULL, 38, 1, 'User and User Admin Only', ' ( `civicrm_group_contact_cache_242`.group_id = 94 ) ', 'a:10:{s:15:"civicrm_contact";i:1;s:15:"civicrm_address";i:1;s:22:"civicrm_state_province";i:1;s:15:"civicrm_country";i:1;s:13:"civicrm_email";i:1;s:13:"civicrm_phone";i:1;s:10:"civicrm_im";i:1;s:19:"civicrm_worldregion";i:1;s:33:"`civicrm_group_contact_cache_94`";s:136:" LEFT JOIN civicrm_group_contact_cache `civicrm_group_contact_cache_94` ON contact_a.id = `civicrm_group_contact_cache_94`.contact_id ";s:6:"gender";i:1;}', 'a:2:{s:15:"civicrm_contact";i:1;s:33:"`civicrm_group_contact_cache_94`";s:136:" LEFT JOIN civicrm_group_contact_cache `civicrm_group_contact_cache_94` ON contact_a.id = `civicrm_group_contact_cache_94`.contact_id ";}', NULL, NULL, NULL, NULL, NULL, 0, 0, NULL); +INSERT INTO `civicrm_group` (`id`, `name`, `title`, `frontend_title`, `description`, `source`, `saved_search_id`, `is_active`, `visibility`, `where_clause`, `select_tables`, `where_tables`, `group_type`, `cache_date`, `refresh_date`, `parents`, `children`, `is_hidden`, `is_reserved`, `created_id`) VALUES (94, '_null_streets', '@ null streets', '@ null streets', NULL, NULL, 38, 1, 'User and User Admin Only', ' ( `civicrm_group_contact_cache_242`.group_id = 94 ) ', 'a:10:{s:15:"civicrm_contact";i:1;s:15:"civicrm_address";i:1;s:22:"civicrm_state_province";i:1;s:15:"civicrm_country";i:1;s:13:"civicrm_email";i:1;s:13:"civicrm_phone";i:1;s:10:"civicrm_im";i:1;s:19:"civicrm_worldregion";i:1;s:33:"`civicrm_group_contact_cache_94`";s:136:" LEFT JOIN civicrm_group_contact_cache `civicrm_group_contact_cache_94` ON contact_a.id = `civicrm_group_contact_cache_94`.contact_id ";s:6:"gender";i:1;}', 'a:2:{s:15:"civicrm_contact";i:1;s:33:"`civicrm_group_contact_cache_94`";s:136:" LEFT JOIN civicrm_group_contact_cache `civicrm_group_contact_cache_94` ON contact_a.id = `civicrm_group_contact_cache_94`.contact_id ";}', NULL, NULL, NULL, NULL, NULL, 0, 0, NULL); diff --git a/tests/phpunit/CRM/Contact/BAO/SavedSearchDataSets/primary_multiple_state_province.sql b/tests/phpunit/CRM/Contact/BAO/SavedSearchDataSets/primary_multiple_state_province.sql index 195e77348897..761209dff25e 100644 --- a/tests/phpunit/CRM/Contact/BAO/SavedSearchDataSets/primary_multiple_state_province.sql +++ b/tests/phpunit/CRM/Contact/BAO/SavedSearchDataSets/primary_multiple_state_province.sql @@ -4,4 +4,4 @@ INSERT INTO `civicrm_mapping_field` (`id`, `mapping_id`, `name`, `contact_type`, (2846, 114, 'state_province', 'Contact', 0, NULL, NULL, NULL, NULL, NULL, 1, 'IN', '1501,2704', NULL); INSERT INTO `civicrm_saved_search` (`id`, `form_values`, `mapping_id`, `search_custom_id`) VALUES (333, 'a:5:{s:6:"mapper";a:1:{i:1;a:1:{i:0;a:3:{i:0;s:7:"Contact";i:1;s:14:"state_province";i:2;s:1:" ";}}}s:8:"operator";a:1:{i:1;a:1:{i:0;s:2:"IN";}}s:5:"value";a:1:{i:1;a:1:{i:0;s:9:"1501,2074";}}s:8:"radio_ts";s:6:"ts_all";s:4:"task";s:0:"";}', '114', NULL); -INSERT INTO `civicrm_group` (`id`, `name`, `title`, `description`, `source`, `saved_search_id`, `is_active`, `visibility`) VALUES (98, 'core_2874', 'Core 2874 test group', NULL, NULL, 333, 1, 'User and User Admin Only'); +INSERT INTO `civicrm_group` (`id`, `name`, `frontend_title`, `title`, `description`, `source`, `saved_search_id`, `is_active`, `visibility`) VALUES (98, 'core_2874', 'Core 2874 test group', 'Core 2874 test group', NULL, NULL, 333, 1, 'User and User Admin Only'); diff --git a/xml/schema/Contact/Group.xml b/xml/schema/Contact/Group.xml index 704d14f78aad..50bbdad576b6 100644 --- a/xml/schema/Contact/Group.xml +++ b/xml/schema/Contact/Group.xml @@ -35,6 +35,7 @@ varcharGroup Name64 + trueInternal name of Group.1.1 @@ -43,6 +44,7 @@ varcharGroup Title255 + truetrueName of Group.1.1 @@ -121,6 +123,7 @@ Group Where Clausethe sql where clause if a saved search acltrue + true1.6 @@ -130,11 +133,13 @@ the tables to be included in a select data true PHP + true 1.6 where_tables text + true Tables For Where Clause the tables to be included in the count statement true @@ -295,7 +300,7 @@ 255 true Alternative public title for this Group. - NULL + TRUE 5.31 Text diff --git a/xml/templates/case_sample.tpl b/xml/templates/case_sample.tpl index cdcb7e3f61f6..297940df3b2b 100644 --- a/xml/templates/case_sample.tpl +++ b/xml/templates/case_sample.tpl @@ -84,4 +84,4 @@ SELECT 'Benefits Specialist is', 'Benefits Specialist is', 'Benefits Specialist' -- * -- *******************************************************/ -INSERT INTO `civicrm_group` ( `name`, `title`, `description`, `source`, `saved_search_id`, `is_active`, `visibility`, `where_clause`, `select_tables`, `where_tables`, `group_type`, `cache_date`, `parents`, `children`, `is_hidden` ) (SELECT 'Case_Resources', 'Case Resources', 'Contacts in this group are listed with their phone number and email when viewing case. You also can send copies of case activities to these contacts.', NULL, NULL, 1, 'User and User Admin Only', ' ( `civicrm_group_contact-5`.group_id IN ( 5 ) AND `civicrm_group_contact-5`.status IN ("Added") ) ', 'a:10:{ldelim}s:15:"civicrm_contact";i:1;s:15:"civicrm_address";i:1;s:22:"civicrm_state_province";i:1;s:15:"civicrm_country";i:1;s:13:"civicrm_email";i:1;s:13:"civicrm_phone";i:1;s:10:"civicrm_im";i:1;s:19:"civicrm_worldregion";i:1;s:25:"`civicrm_group_contact-5`";s:114:" LEFT JOIN civicrm_group_contact `civicrm_group_contact-5` ON contact_a.id = `civicrm_group_contact-5`.contact_id ";s:6:"gender";i:1;{rdelim}', 'a:2:{ldelim}s:15:"civicrm_contact";i:1;s:25:"`civicrm_group_contact-5`";s:114:" LEFT JOIN civicrm_group_contact `civicrm_group_contact-5` ON contact_a.id = `civicrm_group_contact-5`.contact_id ";{rdelim}', '2', NULL, NULL, NULL, 0 FROM dual WHERE NOT EXISTS (SELECT * FROM `civicrm_group` WHERE `name` = 'Case_Resources')); +INSERT INTO `civicrm_group` (`name`, `title`, `frontend_title`, `description`, `source`, `saved_search_id`, `is_active`, `visibility`, `where_clause`, `select_tables`, `where_tables`, `group_type`, `cache_date`, `parents`, `children`, `is_hidden` ) (SELECT 'Case_Resources', 'Case Resources', 'Case Resources', 'Contacts in this group are listed with their phone number and email when viewing case. You also can send copies of case activities to these contacts.', NULL, NULL, 1, 'User and User Admin Only', ' ( `civicrm_group_contact-5`.group_id IN ( 5 ) AND `civicrm_group_contact-5`.status IN ("Added") ) ', 'a:10:{ldelim}s:15:"civicrm_contact";i:1;s:15:"civicrm_address";i:1;s:22:"civicrm_state_province";i:1;s:15:"civicrm_country";i:1;s:13:"civicrm_email";i:1;s:13:"civicrm_phone";i:1;s:10:"civicrm_im";i:1;s:19:"civicrm_worldregion";i:1;s:25:"`civicrm_group_contact-5`";s:114:" LEFT JOIN civicrm_group_contact `civicrm_group_contact-5` ON contact_a.id = `civicrm_group_contact-5`.contact_id ";s:6:"gender";i:1;{rdelim}', 'a:2:{ldelim}s:15:"civicrm_contact";i:1;s:25:"`civicrm_group_contact-5`";s:114:" LEFT JOIN civicrm_group_contact `civicrm_group_contact-5` ON contact_a.id = `civicrm_group_contact-5`.contact_id ";{rdelim}', '2', NULL, NULL, NULL, 0 FROM dual WHERE NOT EXISTS (SELECT * FROM `civicrm_group` WHERE `name` = 'Case_Resources'));
{$form.title.label} {if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_group' field='title' id=$group.id}{/if}{$form.title.html|crmAddClass:huge} - {if !empty($group.saved_search_id)} ({ts}Smart Group{/ts}){/if} -
{$form.description.label}{$form.description.html}
{ts}If either of the following fields are filled out they will be used instead of the title or description field in profiles and Mailing List Subscription/unsubscribe forms{/ts}
{$form.frontend_title.label} {if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_group' field='frontend_title' id=$group.id}{/if} {$form.frontend_title.html|crmAddClass:huge} - {if !empty($group.saved_search_id)} ({ts}Smart Group{/ts}){/if} + {if !empty($group.saved_search_id)} ({ts}Smart Group{/ts}){/if}
{$form.frontend_description.label} {if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_group' field='frontend_description' id=$group.id}{/if} {$form.frontend_description.html}
{$form.title.label} {if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_group' field='title' id=$group.id}{/if}{$form.title.html|crmAddClass:huge} + {if !empty($group.saved_search_id)} ({ts}Smart Group{/ts}){/if} +
{$form.description.label}{$form.description.html}