Skip to content
Snippets Groups Projects
Unverified Commit 7edebbb0 authored by Seamus Lee's avatar Seamus Lee Committed by GitHub
Browse files

Merge pull request #17495 from seamuslee001/5.26

#1794 Fix issue where unchecking a checkbox may not get reflected in the database
parents 26318814 80beb791
No related branches found
No related tags found
No related merge requests found
......@@ -481,7 +481,6 @@ class CRM_Admin_Form_ScheduleReminders extends CRM_Admin_Form {
'subject',
'absolute_date',
'group_id',
'record_activity',
'limit_to',
'mode',
'sms_provider_id',
......@@ -492,7 +491,10 @@ class CRM_Admin_Form_ScheduleReminders extends CRM_Admin_Form {
$params[$key] = $values[$key] ?? NULL;
}
$params['is_repeat'] = CRM_Utils_Array::value('is_repeat', $values, 0);
// set boolean fields to false if not set.
foreach (['record_activity', 'is_repeat', 'is_active'] as $boolFieldName) {
$params[$boolFieldName] = $values[$boolFieldName] ?? 0;
}
$moreKeys = [
'start_action_offset',
......@@ -559,8 +561,6 @@ class CRM_Admin_Form_ScheduleReminders extends CRM_Admin_Form {
$params['entity_status'] = implode(CRM_Core_DAO::VALUE_SEPARATOR, $entity_status);
}
$params['is_active'] = CRM_Utils_Array::value('is_active', $values, 0);
if (empty($values['is_repeat'])) {
$params['repetition_frequency_unit'] = 'null';
$params['repetition_frequency_interval'] = 'null';
......
......@@ -6,7 +6,7 @@
*
* Generated from xml/schema/CRM/Core/CustomGroup.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
* (GenCodeChecksum:1e40fdbcc363c9b5e4c880a6838c7375)
* (GenCodeChecksum:9fe326403964113e2dde1631bf583c5e)
*/
/**
......@@ -80,7 +80,7 @@ class CRM_Core_DAO_CustomGroup extends CRM_Core_DAO {
/**
* Will this group be in collapsed or expanded mode on initial display ?
*
* @var int
* @var bool
*/
public $collapse_display;
......@@ -143,7 +143,7 @@ class CRM_Core_DAO_CustomGroup extends CRM_Core_DAO {
/**
* Will this group be in collapsed or expanded mode on advanced search display ?
*
* @var int
* @var bool
*/
public $collapse_adv_display;
......@@ -313,7 +313,7 @@ class CRM_Core_DAO_CustomGroup extends CRM_Core_DAO {
],
'collapse_display' => [
'name' => 'collapse_display',
'type' => CRM_Utils_Type::T_INT,
'type' => CRM_Utils_Type::T_BOOLEAN,
'title' => ts('Collapse Custom Group?'),
'description' => ts('Will this group be in collapsed or expanded mode on initial display ?'),
'where' => 'civicrm_custom_group.collapse_display',
......@@ -429,7 +429,7 @@ class CRM_Core_DAO_CustomGroup extends CRM_Core_DAO {
],
'collapse_adv_display' => [
'name' => 'collapse_adv_display',
'type' => CRM_Utils_Type::T_INT,
'type' => CRM_Utils_Type::T_BOOLEAN,
'title' => ts('Collapse Group Display'),
'description' => ts('Will this group be in collapsed or expanded mode on advanced search display ?'),
'where' => 'civicrm_custom_group.collapse_adv_display',
......
{* file to handle db changes in 5.27.alpha1 during upgrade *}
-- dev/core/-/issues/1794
ALTER TABLE `civicrm_custom_group` CHANGE `collapse_adv_display` `collapse_adv_display` TINYINT(4) UNSIGNED NULL DEFAULT '0' COMMENT 'Will this group be in collapsed or expanded mode on advanced search display ?';
ALTER TABLE `civicrm_custom_group` CHANGE `collapse_display` `collapse_display` TINYINT(4) UNSIGNED NULL DEFAULT '0' COMMENT 'Will this group be in collapsed or expanded mode on initial display ?';
This diff is collapsed.
......@@ -94,7 +94,7 @@
</field>
<field>
<name>collapse_display</name>
<type>int unsigned</type>
<type>boolean</type>
<title>Collapse Custom Group?</title>
<default>0</default>
<comment>Will this group be in collapsed or expanded mode on initial display ?</comment>
......@@ -174,7 +174,7 @@
</field>
<field>
<name>collapse_adv_display</name>
<type>int unsigned</type>
<type>boolean</type>
<title>Collapse Group Display</title>
<default>0</default>
<comment>Will this group be in collapsed or expanded mode on advanced search display ?</comment>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment