Skip to content

Commit

Permalink
Add description to saved search
Browse files Browse the repository at this point in the history
  • Loading branch information
eileenmcnaughton committed Mar 3, 2021
1 parent e12bf0a commit 50a3c26
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 1 deletion.
23 changes: 22 additions & 1 deletion CRM/Contact/DAO/SavedSearch.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*
* Generated from xml/schema/CRM/Contact/SavedSearch.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
* (GenCodeChecksum:25d5385ad222a7a7290fd18b3a27af8a)
* (GenCodeChecksum:a3174cf037ca35817f5d51d0a16b6de7)
*/

/**
Expand Down Expand Up @@ -121,6 +121,11 @@ class CRM_Contact_DAO_SavedSearch extends CRM_Core_DAO {
*/
public $modified_date;

/**
* @var text
*/
public $description;

/**
* Class constructor.
*/
Expand Down Expand Up @@ -360,6 +365,22 @@ public static function &fields() {
'localizable' => 0,
'add' => '5.36',
],
'description' => [
'name' => 'description',
'type' => CRM_Utils_Type::T_TEXT,
'title' => ts('Saved Search Description'),
'rows' => 2,
'cols' => 60,
'where' => 'civicrm_saved_search.description',
'table_name' => 'civicrm_saved_search',
'entity' => 'SavedSearch',
'bao' => 'CRM_Contact_BAO_SavedSearch',
'localizable' => 0,
'html' => [
'type' => 'TextArea',
],
'add' => '5.36',
],
];
CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']);
}
Expand Down
2 changes: 2 additions & 0 deletions CRM/Upgrade/Incremental/php/FiveThirtySix.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ public function upgrade_5_36_alpha1(string $rev): void {
'civicrm_saved_search', 'created_date', "timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'When the search was created.'");
$this->addTask('core-issue#2422 - Add modified_date to civicrm_saved_search', 'addColumn',
'civicrm_saved_search', 'modified_date', "timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'When the search was last modified.'");
$this->addTask('core-issue#2422 - Add description to civicrm_saved_search', 'addColumn',
'civicrm_saved_search', 'description', "text DEFAULT NULL");

$this->addTask('core-issue#2422 - Add constraints to civicrm_saved_search', 'taskAddConstraints');

Expand Down
11 changes: 11 additions & 0 deletions xml/schema/Contact/SavedSearch.xml
Original file line number Diff line number Diff line change
Expand Up @@ -194,4 +194,15 @@
<default>CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP</default>
<add>5.36</add>
</field>
<field>
<name>description</name>
<type>text</type>
<title>Saved Search Description</title>
<html>
<type>TextArea</type>
<rows>2</rows>
<cols>60</cols>
</html>
<add>5.36</add>
</field>
</table>

0 comments on commit 50a3c26

Please sign in to comment.