Add description to saved search
authoreileen <emcnaughton@wikimedia.org>
Wed, 3 Mar 2021 06:23:29 +0000 (19:23 +1300)
committereileen <emcnaughton@wikimedia.org>
Wed, 3 Mar 2021 19:36:13 +0000 (08:36 +1300)
CRM/Contact/DAO/SavedSearch.php
CRM/Upgrade/Incremental/php/FiveThirtySix.php
xml/schema/Contact/SavedSearch.xml

index 7ae09f365e6673e50ac648bb2573b681213d3625..349075a5d97692debcad1a4ffc46cbdfca92ca0e 100644 (file)
@@ -6,7 +6,7 @@
  *
  * Generated from xml/schema/CRM/Contact/SavedSearch.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:25d5385ad222a7a7290fd18b3a27af8a)
+ * (GenCodeChecksum:1ca4440b5a09843b5d87d595a6d826ef)
  */
 
 /**
@@ -115,12 +115,17 @@ class CRM_Contact_DAO_SavedSearch extends CRM_Core_DAO {
   public $created_date;
 
   /**
-   * When the search was lase modified.
+   * When the search was last modified.
    *
    * @var timestamp
    */
   public $modified_date;
 
+  /**
+   * @var text
+   */
+  public $description;
+
   /**
    * Class constructor.
    */
@@ -350,7 +355,7 @@ class CRM_Contact_DAO_SavedSearch extends CRM_Core_DAO {
           'name' => 'modified_date',
           'type' => CRM_Utils_Type::T_TIMESTAMP,
           'title' => ts('Modified Date'),
-          'description' => ts('When the search was lase modified.'),
+          'description' => ts('When the search was last modified.'),
           'required' => TRUE,
           'where' => 'civicrm_saved_search.modified_date',
           'default' => 'CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP',
@@ -360,6 +365,22 @@ class CRM_Contact_DAO_SavedSearch extends CRM_Core_DAO {
           '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']);
     }
index 0eb9278a9f4e06d4b0228449459de22e26367653..267c97325e1b78feb1ba13c98b5f8f1c8993fe93 100644 (file)
@@ -79,6 +79,8 @@ class CRM_Upgrade_Incremental_php_FiveThirtySix extends CRM_Upgrade_Incremental_
       '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');
 
index d5bd5213f47703a378b341ab9eacd1d116510d87..586dd301955f617b008eef67c1c5b8df9eb5c225 100644 (file)
   <field>
     <name>modified_date</name>
     <type>timestamp</type>
-    <comment>When the search was lase modified.</comment>
+    <comment>When the search was last modified.</comment>
     <required>true</required>
     <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>