Field metadata cleanup: Contact & Activity
authorColeman Watts <coleman@civicrm.org>
Mon, 11 Nov 2019 18:39:04 +0000 (13:39 -0500)
committerColeman Watts <coleman@civicrm.org>
Mon, 11 Nov 2019 18:39:04 +0000 (13:39 -0500)
CRM/Activity/BAO/Activity.php
CRM/Activity/DAO/Activity.php
CRM/Contact/DAO/Contact.php
xml/schema/Activity/Activity.xml
xml/schema/Contact/Contact.xml

index f6034293bad1c245857297b4d0dbac1c0a696093..be3011c80f62e009cd98c4b4a99eccb212737980 100644 (file)
@@ -2140,6 +2140,7 @@ AND cl.modified_id  = c.id
         ],
       ];
       $fields = array_merge($Activityfields, $exportableFields);
+      $fields['activity_type_id']['title'] = ts('Activity Type ID');
     }
     else {
       // Set title to activity fields.
index 60fad910b6b563011a1a85d3c05b5bc6859824a6..0b4fde7b06e51e4657bd8546ccb215386779a4f4 100644 (file)
@@ -6,7 +6,7 @@
  *
  * Generated from xml/schema/CRM/Activity/Activity.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:fa6ffb0aaff92c8a515aff74919c7ad3)
+ * (GenCodeChecksum:1d6842701f82cb5ee56916c7599b3b3d)
  */
 
 /**
@@ -270,7 +270,7 @@ class CRM_Activity_DAO_Activity extends CRM_Core_DAO {
         'activity_type_id' => [
           'name' => 'activity_type_id',
           'type' => CRM_Utils_Type::T_INT,
-          'title' => ts('Activity Type ID'),
+          'title' => ts('Activity Type'),
           'description' => ts('FK to civicrm_option_value.id, that has to be valid, registered activity type.'),
           'required' => TRUE,
           'import' => TRUE,
@@ -341,7 +341,7 @@ class CRM_Activity_DAO_Activity extends CRM_Core_DAO {
           'bao' => 'CRM_Activity_BAO_Activity',
           'localizable' => 0,
           'html' => [
-            'type' => 'Text',
+            'type' => 'Number',
           ],
         ],
         'activity_location' => [
@@ -366,7 +366,7 @@ class CRM_Activity_DAO_Activity extends CRM_Core_DAO {
         'phone_id' => [
           'name' => 'phone_id',
           'type' => CRM_Utils_Type::T_INT,
-          'title' => ts('Phone (called) ID'),
+          'title' => ts('Phone (called)'),
           'description' => ts('Phone ID of the number called (optional - used if an existing phone number is selected).'),
           'where' => 'civicrm_activity.phone_id',
           'table_name' => 'civicrm_activity',
@@ -476,7 +476,7 @@ class CRM_Activity_DAO_Activity extends CRM_Core_DAO {
           'bao' => 'CRM_Activity_BAO_Activity',
           'localizable' => 0,
           'html' => [
-            'type' => 'Select',
+            'type' => 'CheckBox',
           ],
         ],
         'activity_medium_id' => [
@@ -535,9 +535,6 @@ class CRM_Activity_DAO_Activity extends CRM_Core_DAO {
           'entity' => 'Activity',
           'bao' => 'CRM_Activity_BAO_Activity',
           'localizable' => 0,
-          'html' => [
-            'type' => 'CheckBox',
-          ],
         ],
         'original_id' => [
           'name' => 'original_id',
@@ -563,9 +560,6 @@ class CRM_Activity_DAO_Activity extends CRM_Core_DAO {
           'entity' => 'Activity',
           'bao' => 'CRM_Activity_BAO_Activity',
           'localizable' => 0,
-          'html' => [
-            'type' => 'Text',
-          ],
         ],
         'activity_is_deleted' => [
           'name' => 'is_deleted',
@@ -581,7 +575,7 @@ class CRM_Activity_DAO_Activity extends CRM_Core_DAO {
           'bao' => 'CRM_Activity_BAO_Activity',
           'localizable' => 0,
           'html' => [
-            'type' => 'Text',
+            'type' => 'CheckBox',
           ],
         ],
         'activity_campaign_id' => [
@@ -598,7 +592,7 @@ class CRM_Activity_DAO_Activity extends CRM_Core_DAO {
           'localizable' => 0,
           'FKClassName' => 'CRM_Campaign_DAO_Campaign',
           'html' => [
-            'type' => 'CheckBox',
+            'type' => 'Select',
           ],
           'pseudoconstant' => [
             'table' => 'civicrm_campaign',
@@ -635,9 +629,6 @@ class CRM_Activity_DAO_Activity extends CRM_Core_DAO {
           'entity' => 'Activity',
           'bao' => 'CRM_Activity_BAO_Activity',
           'localizable' => 0,
-          'html' => [
-            'type' => 'Text',
-          ],
         ],
         'is_star' => [
           'name' => 'is_star',
@@ -653,6 +644,9 @@ class CRM_Activity_DAO_Activity extends CRM_Core_DAO {
           'entity' => 'Activity',
           'bao' => 'CRM_Activity_BAO_Activity',
           'localizable' => 0,
+          'html' => [
+            'type' => 'Checkbox',
+          ],
         ],
         'activity_created_date' => [
           'name' => 'created_date',
index c0637da82e34800d25d8d64eaf0ac109820874fa..a799fa9d925c84f45a4c4fdc7b1f1a7eb35c0edc 100644 (file)
@@ -6,7 +6,7 @@
  *
  * Generated from xml/schema/CRM/Contact/Contact.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:ee3bf9f2d1faed5a4de439ecf0537ac6)
+ * (GenCodeChecksum:b72765d873639076299753a8c4e676d5)
  */
 
 /**
@@ -990,6 +990,9 @@ class CRM_Contact_DAO_Contact extends CRM_Core_DAO {
           'entity' => 'Contact',
           'bao' => 'CRM_Contact_BAO_Contact',
           'localizable' => 0,
+          'html' => [
+            'type' => 'Select',
+          ],
           'pseudoconstant' => [
             'optionGroupName' => 'email_greeting',
             'optionEditPath' => 'civicrm/admin/options/email_greeting',
@@ -1025,9 +1028,6 @@ class CRM_Contact_DAO_Contact extends CRM_Core_DAO {
           'entity' => 'Contact',
           'bao' => 'CRM_Contact_BAO_Contact',
           'localizable' => 0,
-          'html' => [
-            'type' => 'Text',
-          ],
         ],
         'postal_greeting_id' => [
           'name' => 'postal_greeting_id',
@@ -1041,7 +1041,7 @@ class CRM_Contact_DAO_Contact extends CRM_Core_DAO {
           'bao' => 'CRM_Contact_BAO_Contact',
           'localizable' => 0,
           'html' => [
-            'type' => 'Text',
+            'type' => 'Select',
           ],
           'pseudoconstant' => [
             'optionGroupName' => 'postal_greeting',
@@ -1078,9 +1078,6 @@ class CRM_Contact_DAO_Contact extends CRM_Core_DAO {
           'entity' => 'Contact',
           'bao' => 'CRM_Contact_BAO_Contact',
           'localizable' => 0,
-          'html' => [
-            'type' => 'Text',
-          ],
         ],
         'addressee_id' => [
           'name' => 'addressee_id',
@@ -1093,6 +1090,9 @@ class CRM_Contact_DAO_Contact extends CRM_Core_DAO {
           'entity' => 'Contact',
           'bao' => 'CRM_Contact_BAO_Contact',
           'localizable' => 0,
+          'html' => [
+            'type' => 'Select',
+          ],
           'pseudoconstant' => [
             'optionGroupName' => 'addressee',
             'optionEditPath' => 'civicrm/admin/options/addressee',
@@ -1128,9 +1128,6 @@ class CRM_Contact_DAO_Contact extends CRM_Core_DAO {
           'entity' => 'Contact',
           'bao' => 'CRM_Contact_BAO_Contact',
           'localizable' => 0,
-          'html' => [
-            'type' => 'Text',
-          ],
         ],
         'job_title' => [
           'name' => 'job_title',
@@ -1258,9 +1255,6 @@ class CRM_Contact_DAO_Contact extends CRM_Core_DAO {
           'bao' => 'CRM_Contact_BAO_Contact',
           'localizable' => 0,
           'FKClassName' => 'CRM_Contact_DAO_Contact',
-          'html' => [
-            'type' => 'Select',
-          ],
         ],
         'organization_name' => [
           'name' => 'organization_name',
index 6b6da122492cd095a3346467dbef37733ace6dd8..8bb01cba9a9619914b30a074e3cf196c468229f9 100644 (file)
@@ -58,7 +58,7 @@
   </index>
   <field>
     <name>activity_type_id</name>
-    <title>Activity Type ID</title>
+    <title>Activity Type</title>
     <import>true</import>
     <type>int unsigned</type>
     <required>true</required>
     <comment>Planned or actual duration of activity expressed in minutes. Conglomerate of former duration_hours and duration_minutes.</comment>
     <add>2.0</add>
     <html>
-      <type>Text</type>
+      <type>Number</type>
     </html>
   </field>
   <field>
   <field>
     <name>phone_id</name>
     <type>int unsigned</type>
-    <title>Phone (called) ID</title>
+    <title>Phone (called)</title>
     <comment>Phone ID of the number called (optional - used if an existing phone number is selected).</comment>
     <add>2.0</add>
     <html>
     <headerPattern>/(is.)?test(.activity)?/i</headerPattern>
     <add>2.0</add>
     <html>
-      <type>Select</type>
+      <type>CheckBox</type>
     </html>
   </field>
   <field>
     <import>true</import>
     <headerPattern>/(is.)?(current.)?(revision|version(ing)?)/i</headerPattern>
     <add>2.2</add>
-    <html>
-      <type>CheckBox</type>
-    </html>
   </field>
   <index>
     <name>index_is_current_revision</name>
     <title>Result</title>
     <length>255</length>
     <comment>Currently being used to store result id for survey activity, FK to option value.</comment>
-    <html>
-      <type>Text</type>
-    </html>
     <add>3.3</add>
   </field>
   <field>
     <headerPattern>/(activity.)?(trash|deleted)/i</headerPattern>
     <add>2.2</add>
     <html>
-      <type>Text</type>
+      <type>CheckBox</type>
     </html>
   </field>
   <index>
     </pseudoconstant>
     <add>3.4</add>
     <html>
-      <type>CheckBox</type>
+      <type>Select</type>
     </html>
   </field>
   <foreignKey>
     <title>Order</title>
     <type>int</type>
     <add>4.1</add>
-    <html>
-      <type>Text</type>
-    </html>
   </field>
   <field>
     <name>is_star</name>
     <comment>Activity marked as favorite.</comment>
     <headerPattern>/(activity.)?(star|favorite)/i</headerPattern>
     <add>4.7</add>
+    <html>
+      <type>Checkbox</type>
+    </html>
   </field>
   <field>
     <name>created_date</name>
index 14965f9ffcb4f6960bac163b6b6b2f2d8d5a0315..7facb329ca523a274ade049479c90615043d2030 100644 (file)
     <title>Website</title>
     <type>varchar</type>
     <length>128</length>
-    <html>
-      <type>Text</type>
-      <size>30</size>
-    </html>
-
     <import>true</import>
     <headerPattern>/^(home\sURL)|URL|web|site/i</headerPattern>
     <dataPattern>/^[\w\/\:\.]+$/</dataPattern>
     <name>index_last_name</name>
     <fieldName>last_name</fieldName>
     <add>1.8</add>
-    <html>
-      <type>Text</type>
-    </html>
   </index>
   <field>
     <name>prefix_id</name>
     <export>true</export>
     <comment>FK to civicrm_option_value.id, that has to be valid registered Email Greeting.</comment>
     <add>3.0</add>
+    <html>
+      <type>Select</type>
+    </html>
     <pseudoconstant>
       <optionGroupName>email_greeting</optionGroupName>
     </pseudoconstant>
     <length>255</length>
     <comment>Cache Email Greeting.</comment>
     <add>3.0</add>
-    <html>
-      <type>Text</type>
-    </html>
   </field>
   <field>
     <name>postal_greeting_id</name>
     <comment>FK to civicrm_option_value.id, that has to be valid registered Postal Greeting.</comment>
     <add>3.0</add>
     <html>
-      <type>Text</type>
+      <type>Select</type>
     </html>
     <pseudoconstant>
       <optionGroupName>postal_greeting</optionGroupName>
     <length>255</length>
     <comment>Cache Postal greeting.</comment>
     <add>3.0</add>
-    <html>
-      <type>Text</type>
-    </html>
   </field>
   <field>
     <name>addressee_id</name>
     <comment>FK to civicrm_option_value.id, that has to be valid registered Addressee.</comment>
     <add>3.0</add>
     <export>true</export>
+    <html>
+      <type>Select</type>
+    </html>
     <pseudoconstant>
       <optionGroupName>addressee</optionGroupName>
     </pseudoconstant>
     <length>255</length>
     <comment>Cache Addressee.</comment>
     <add>3.0</add>
-    <html>
-      <type>Text</type>
-    </html>
   </field>
   <field>
     <name>job_title</name>
     <name>UI_gender</name>
     <fieldName>gender_id</fieldName>
     <add>1.6</add>
-    <html>
-      <type>Select</type>
-    </html>
   </index>
   <field>
     <name>birth_date</name>
     <title>Household Primary Contact ID</title>
     <comment>Optional FK to Primary Contact for this household.</comment>
     <add>1.1</add>
-    <html>
-      <type>Select</type>
-    </html>
   </field>
   <foreignKey>
     <name>primary_contact_id</name>