Skip to content

Commit

Permalink
Merge pull request #24068 from totten/master-552
Browse files Browse the repository at this point in the history
Merge forward 5.52-rc => master
  • Loading branch information
totten authored Jul 28, 2022
2 parents cabac33 + 054c964 commit b67de01
Show file tree
Hide file tree
Showing 5 changed files with 343 additions and 2 deletions.
25 changes: 25 additions & 0 deletions CRM/Upgrade/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -607,6 +607,13 @@ public static function buildQueue($currentVer, $latestVer, $postUpgradeMessageFi
// This places the extension-upgrades after `doCoreFinish` - but before new extensions (`addExtensionTask()`)
$queue->createItem($task, ['weight' => 1500]);

$task = new CRM_Queue_Task(
['CRM_Upgrade_Form', 'doFinalMessages'],
[$currentVer, $latestVer, $postUpgradeMessageFile],
'Generate final messages'
);
$queue->createItem($task, ['weight' => 3000]);

return $queue;
}

Expand Down Expand Up @@ -856,6 +863,24 @@ public static function enqueueExtUpgrades(CRM_Queue_TaskContext $ctx): bool {
return TRUE;
}

/**
* Generate any standard post-upgrade messages (which are not version-specific).
*
* @param \CRM_Queue_TaskContext $ctx
* @param string $originalVer
* the original revision.
* @param string $latestVer
* the target (final) revision.
* @param string $postUpgradeMessageFile
* path of a modifiable file which lists the post-upgrade messages.
*
* @return bool
*/
public static function doFinalMessages(CRM_Queue_TaskContext $ctx, $originalVer, $latestVer, $postUpgradeMessageFile): bool {
// There are currently no final messages to list. However, this stub may be useful for future messages.
return TRUE;
}

/**
* After finishing the queue, the upgrade-runner calls `doFinish()`.
*
Expand Down
8 changes: 8 additions & 0 deletions CRM/Upgrade/Incremental/php/FiveFiftyTwo.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ class CRM_Upgrade_Incremental_php_FiveFiftyTwo extends CRM_Upgrade_Incremental_B
* The version number matching this function name
*/
public function upgrade_5_52_alpha1($rev): void {
$this->addSnapshotTask('contribution', CRM_Utils_SQL_Select::from('civicrm_contribution')
->where('(contribution_recur_id IS NOT NULL) or (is_template = 1)')
->select(['id', 'contribution_recur_id', 'is_template', 'total_amount'])
);
$this->addSnapshotTask('contribution_recur', CRM_Utils_SQL_Select::from('civicrm_contribution_recur')
->select(['id', 'amount', 'modified_date'])
);

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

Expand Down
12 changes: 11 additions & 1 deletion release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,20 @@ Other resources for identifying changes are:

## CiviCRM 5.51.0

Released August 3, 2022

- **[Synopsis](release-notes/5.52.0.md#synopsis)**
- **[Features](release-notes/5.52.0.md#features)**
- **[Bugs resolved](release-notes/5.52.0.md#bugs)**
- **[Miscellany](release-notes/5.52.0.md#misc)**
- **[Credits](release-notes/5.52.0.md#credits)**
- **[Feedback](release-notes/5.52.0.md#feedback)**

## CiviCRM 5.51.0

Released July 6, 2022

- **[Synopsis](release-notes/5.51.0.md#synopsis)**
- **[Security advisories](release-notes/5.51.0.md#security)**
- **[Features](release-notes/5.51.0.md#features)**
- **[Bugs resolved](release-notes/5.51.0.md#bugs)**
- **[Miscellany](release-notes/5.51.0.md#misc)**
Expand Down
7 changes: 6 additions & 1 deletion release-notes/5.51.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
Released July 6, 2022

- **[Synopsis](#synopsis)**
- **[Security advisories](#security)**
- **[Features](#features)**
- **[Bugs resolved](#bugs)**
- **[Miscellany](#misc)**
Expand Down Expand Up @@ -1118,3 +1117,9 @@ Solutions - Alan Dixon; CiviCoop - Jaap Jansma; Coop SymbioTIC - Samuel Vanhove;
DevApp - Adam Kwiatkowski; Francesc Bassas i Bullich; Fuzion - Peter Davis;
Greenleaf Advancement - Guy Iaccarino; Humanists UK - Andrew West; jaomalley;
Jens Schuppe; Semper IT - Karin Gerritsen; Tadpole Collective - Kevin Cristiano

## <a name="feedback"></a>Feedback

These release notes are edited by Alice Frumin and Andie Hunt. If you'd like
to provide feedback on them, please log in to https://chat.civicrm.org/civicrm
and contact `@agh1`.
Loading

0 comments on commit b67de01

Please sign in to comment.