Pledge: mark needed fields as required in schema
authoreileen <emcnaughton@wikimedia.org>
Sun, 3 Jan 2021 01:02:22 +0000 (14:02 +1300)
committereileen <emcnaughton@wikimedia.org>
Sun, 3 Jan 2021 01:02:22 +0000 (14:02 +1300)
This marks all the fields that are not optional as required. I've been having a bit of a battle adding
a v4 api & I hope this will help - but if not, it's correct for them to be marked required anyway

CRM/Pledge/DAO/Pledge.php
xml/schema/Pledge/Pledge.xml

index f1c70bf347f3ec4be4e9b6f57e6d5ae2bdc28dca..cd7952b522e71c70badc862dbf1f4ff224e5620c 100644 (file)
@@ -6,7 +6,7 @@
  *
  * Generated from xml/schema/CRM/Pledge/Pledge.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:186d3064229a2bd8a2de2483b4bb90c6)
+ * (GenCodeChecksum:6c3c68d4e00946adbfbc368e87d72a36)
  */
 
 /**
@@ -382,6 +382,7 @@ class CRM_Pledge_DAO_Pledge extends CRM_Core_DAO {
           'type' => CRM_Utils_Type::T_STRING,
           'title' => ts('Pledge Frequency Unit'),
           'description' => ts('Time units for recurrence of pledge payments.'),
+          'required' => TRUE,
           'maxlength' => 8,
           'size' => CRM_Utils_Type::EIGHT,
           'where' => 'civicrm_pledge.frequency_unit',
@@ -439,6 +440,7 @@ class CRM_Pledge_DAO_Pledge extends CRM_Core_DAO {
           'type' => CRM_Utils_Type::T_INT,
           'title' => ts('Pledge Number of Installments'),
           'description' => ts('Total number of payments to be made.'),
+          'required' => TRUE,
           'where' => 'civicrm_pledge.installments',
           'export' => TRUE,
           'default' => '1',
@@ -604,6 +606,7 @@ class CRM_Pledge_DAO_Pledge extends CRM_Core_DAO {
           'type' => CRM_Utils_Type::T_INT,
           'title' => ts('Pledge Status Id'),
           'description' => ts('Implicit foreign key to civicrm_option_values in the pledge_status option group.'),
+          'required' => TRUE,
           'import' => TRUE,
           'where' => 'civicrm_pledge.status_id',
           'export' => FALSE,
@@ -624,6 +627,7 @@ class CRM_Pledge_DAO_Pledge extends CRM_Core_DAO {
           'name' => 'is_test',
           'type' => CRM_Utils_Type::T_BOOLEAN,
           'title' => ts('Test'),
+          'required' => TRUE,
           'import' => TRUE,
           'where' => 'civicrm_pledge.is_test',
           'export' => TRUE,
index fe58bcfeda87923f67932ad236735a932b627401..6b967254f5a088ab8c63e1ecf4e78371fc8e87fa 100644 (file)
     <uniqueName>pledge_frequency_unit</uniqueName>
     <title>Pledge Frequency Unit</title>
     <type>varchar</type>
+    <required>true</required>
     <length>8</length>
     <default>'month'</default>
     <comment>Time units for recurrence of pledge payments.</comment>
     <type>int unsigned</type>
     <title>Pledge Number of Installments</title>
     <default>1</default>
+    <required>true</required>
     <comment>Total number of payments to be made.</comment>
     <add>2.1</add>
     <html>
     <name>status_id</name>
     <title>Pledge Status Id</title>
     <uniqueName>pledge_status_id</uniqueName>
+    <required>true</required>
     <import>true</import>
     <export>false</export>
     <type>int unsigned</type>
     <title>Test</title>
     <type>boolean</type>
     <default>0</default>
+    <required>true</required>
     <html>
      <type>CheckBox</type>
    </html>