Skip to content

Commit

Permalink
FiveFortyNine - Draft message for 5.49.2
Browse files Browse the repository at this point in the history
  • Loading branch information
monishdeb authored and totten committed May 19, 2022
1 parent fe59d89 commit 1766a07
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion CRM/Upgrade/Incremental/php/FiveFortyNine.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,16 @@
*/
class CRM_Upgrade_Incremental_php_FiveFortyNine extends CRM_Upgrade_Incremental_Base {

public function setpostUpgradeMessage(&$preUpgradeMessage, $rev) {
if ($rev == '5.49.beta1') {
if ($this->hasConfigBackendData()) {
$postUpgradeMessage .= '<br/>' . ts("WARNING: The column \"<code>civicrm_action_schedule.limit_to</code>\" is now a required boolean field. Please ensure all the schedule reminders (especially with 'Also Include' option) are correct. For more detail please check <a href='%1' target='_blank'>here</a>.", [
1 => 'https://lab.civicrm.org/dev/core/-/issues/3464',
]);
}
}
}

public static function findBooleanColumns(): array {
$r = [];
$files = CRM_Utils_File::findFiles(__DIR__ . '/FiveFortyNine', '*.bool.php');
Expand Down Expand Up @@ -66,7 +76,9 @@ public function upgrade_5_49_beta1($rev): void {
* @param string $rev
*/
public function upgrade_5_49_2($rev) {
$this->addtask('Revert civicrm_action_schedule.limit_to to be NULL', 'changeBooleanColumnLimitTo');
if (version_compare(CRM_Core_BAO_Domain::version(), '5.49', '>=') {
$this->addtask('Revert civicrm_action_schedule.limit_to to be NULL', 'changeBooleanColumnLimitTo');
}
}

/**
Expand Down

0 comments on commit 1766a07

Please sign in to comment.