From 72c65bfa8227952d89905fce057a7458e5feec00 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Tue, 11 Jun 2019 23:16:45 -0400 Subject: [PATCH] Add a couple customField pseudoconstants --- CRM/Core/DAO/CustomField.php | 12 +++++++++--- tests/phpunit/CRM/Contact/BAO/SavedSearchTest.php | 2 +- xml/schema/Core/CustomField.xml | 10 ++++++++-- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/CRM/Core/DAO/CustomField.php b/CRM/Core/DAO/CustomField.php index 573ac27fa0..8bca9d2e78 100644 --- a/CRM/Core/DAO/CustomField.php +++ b/CRM/Core/DAO/CustomField.php @@ -6,7 +6,7 @@ * * Generated from xml/schema/CRM/Core/CustomField.xml * DO NOT EDIT. Generated by CRM_Core_CodeGen - * (GenCodeChecksum:58323f46f5ac021f96591e075b37cca6) + * (GenCodeChecksum:bd9573e2a92ef325a5bbaa1a47f28da7) */ /** @@ -197,14 +197,14 @@ class CRM_Core_DAO_CustomField extends CRM_Core_DAO { public $time_format; /** - * Number of columns in Note Field + * Number of columns in Note Field * * @var int */ public $note_columns; /** - * Number of rows in Note Field + * Number of rows in Note Field * * @var int */ @@ -570,6 +570,9 @@ class CRM_Core_DAO_CustomField extends CRM_Core_DAO { 'entity' => 'CustomField', 'bao' => 'CRM_Core_BAO_CustomField', 'localizable' => 0, + 'pseudoconstant' => [ + 'callback' => 'CRM_Core_SelectValues::getDatePluginInputFormats', + ], ], 'time_format' => [ 'name' => 'time_format', @@ -581,6 +584,9 @@ class CRM_Core_DAO_CustomField extends CRM_Core_DAO { 'entity' => 'CustomField', 'bao' => 'CRM_Core_BAO_CustomField', 'localizable' => 0, + 'pseudoconstant' => [ + 'callback' => 'CRM_Core_SelectValues::getTimeFormats', + ], ], 'note_columns' => [ 'name' => 'note_columns', diff --git a/tests/phpunit/CRM/Contact/BAO/SavedSearchTest.php b/tests/phpunit/CRM/Contact/BAO/SavedSearchTest.php index babcbe1409..0b4a7a90d7 100644 --- a/tests/phpunit/CRM/Contact/BAO/SavedSearchTest.php +++ b/tests/phpunit/CRM/Contact/BAO/SavedSearchTest.php @@ -224,7 +224,7 @@ class CRM_Contact_BAO_SavedSearchTest extends CiviUnitTestCase { 'weight' => 4, 'is_required' => 1, 'is_searchable' => 1, - 'date_format' => 'mm/dd/yyyy', + 'date_format' => 'mm/dd/yy', 'is_active' => 1, ); $customField = $this->callAPIAndDocument('custom_field', 'create', $params, __FUNCTION__, __FILE__); diff --git a/xml/schema/Core/CustomField.xml b/xml/schema/Core/CustomField.xml index 919ec75882..0db6507227 100644 --- a/xml/schema/Core/CustomField.xml +++ b/xml/schema/Core/CustomField.xml @@ -226,6 +226,9 @@ 64 date format for custom date 3.1 + + CRM_Core_SelectValues::getDatePluginInputFormats + time_format @@ -233,19 +236,22 @@ Field Time Format time format for custom date 3.1 + + CRM_Core_SelectValues::getTimeFormats + note_columns int unsigned Field Note Columns - Number of columns in Note Field + Number of columns in Note Field 1.4 note_rows int unsigned Field Note Rows - Number of rows in Note Field + Number of rows in Note Field 1.4 -- 2.25.1