Skip to content

Commit

Permalink
Merge pull request civicrm#24238 from demeritcowboy/boo
Browse files Browse the repository at this point in the history
dev/core#3799 - Fix incorrectly changed default for contact_dashboard.is_active
  • Loading branch information
totten authored Aug 12, 2022
2 parents 0665d6b + 1675d7d commit 1a6e5fb
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
7 changes: 3 additions & 4 deletions CRM/Contact/DAO/DashboardContact.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*
* Generated from xml/schema/CRM/Contact/DashboardContact.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
* (GenCodeChecksum:ca2325df4ca179436e4901bbed693e20)
* (GenCodeChecksum:fd3f7ea02b93c0dd3ecd46fb757bc2a3)
*/

/**
Expand Down Expand Up @@ -67,7 +67,7 @@ class CRM_Contact_DAO_DashboardContact extends CRM_Core_DAO {
/**
* Is this widget active?
*
* @var bool|string
* @var bool|string|null
* (SQL type: tinyint)
* Note that values will be retrieved from the database as a string.
*/
Expand Down Expand Up @@ -195,9 +195,8 @@ public static function &fields() {
'type' => CRM_Utils_Type::T_BOOLEAN,
'title' => ts('Dashlet is Active?'),
'description' => ts('Is this widget active?'),
'required' => TRUE,
'where' => 'civicrm_dashboard_contact.is_active',
'default' => '1',
'default' => '0',
'table_name' => 'civicrm_dashboard_contact',
'entity' => 'DashboardContact',
'bao' => 'CRM_Contact_BAO_DashboardContact',
Expand Down
4 changes: 4 additions & 0 deletions CRM/Upgrade/Incremental/php/FiveFiftyThree.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ public function upgrade_5_53_alpha1($rev): void {
$this->addTask('Add Recent Items Providers', 'addRecentItemsProviders');
}

public function upgrade_5_53_beta1($rev): void {
$this->addTask(ts('Upgrade DB to %1: SQL', [1 => $rev]), 'runSql', $rev);
}

/**
* @param CRM_Queue_TaskContext $ctx
* @return bool
Expand Down
3 changes: 3 additions & 0 deletions CRM/Upgrade/Incremental/sql/5.53.beta1.mysql.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{* file to handle db changes in 5.53.beta1 during upgrade *}

ALTER TABLE `civicrm_dashboard_contact` MODIFY COLUMN `is_active` TINYINT(4) DEFAULT 0 COMMENT 'Is this widget active?';
3 changes: 1 addition & 2 deletions xml/schema/Contact/DashboardContact.xml
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,7 @@
<type>boolean</type>
<title>Dashlet is Active?</title>
<comment>Is this widget active?</comment>
<default>1</default>
<required>true</required>
<default>0</default>
<add>3.1</add>
</field>
<field>
Expand Down

0 comments on commit 1a6e5fb

Please sign in to comment.