Skip to content
Snippets Groups Projects
Unverified Commit e93a8142 authored by totten's avatar totten Committed by GitHub
Browse files

Merge pull request #20809 from totten/master-fwd

Merge forward 5.39 => master
parents 18bb23f2 a9b847ea
Branches
Tags
No related merge requests found
......@@ -55,21 +55,77 @@ class CRM_Upgrade_Incremental_php_FiveThirtyNine extends CRM_Upgrade_Incremental
* (change the x in the function name):
*/
// /**
// * Upgrade function.
// *
// * @param string $rev
// */
// public function upgrade_5_0_x($rev) {
// $this->addTask(ts('Upgrade DB to %1: SQL', [1 => $rev]), 'runSql', $rev);
// $this->addTask('Do the foo change', 'taskFoo', ...);
// // Additional tasks here...
// // Note: do not use ts() in the addTask description because it adds unnecessary strings to transifex.
// // The above is an exception because 'Upgrade DB to %1: SQL' is generic & reusable.
// }
/**
* Upgrade function.
*
* @param string $rev
*/
public function upgrade_5_39_alpha1($rev) {
$this->addTask(ts('Upgrade DB to %1: SQL', [1 => $rev]), 'runSql', $rev);
$this->addTask('Update smart groups to rename filters on case_from and case_to to case_start_date and case_end_date', 'updateSmartGroups', [
'renameField' => [
['old' => 'case_from_relative', 'new' => 'case_start_date_relative'],
['old' => 'case_from_start_date_high', 'new' => 'case_start_date_high'],
['old' => 'case_from_start_date_low', 'new' => 'case_start_date_low'],
['old' => 'case_to_relative', 'new' => 'case_end_date_relative'],
['old' => 'case_to_end_date_high', 'new' => 'case_end_date_high'],
['old' => 'case_to_end_date_low', 'new' => 'case_end_date_low'],
[
'old' => 'mailing_date_relative',
'new' => 'mailing_job_start_date_relative',
],
['old' => 'mailing_date_high', 'new' => 'mailing_job_start_date_high'],
['old' => 'mailing_date_low', 'new' => 'mailing_job_start_date_low'],
[
'old' => 'relation_start_date_low',
'new' => 'relationship_start_date_low',
],
[
'old' => 'relation_start_date_high',
'new' => 'relationship_start_date_high',
],
[
'old' => 'relation_start_date_relative',
'new' => 'relationship_start_date_relative',
],
[
'old' => 'relation_end_date_low',
'new' => 'relationship_end_date_low',
],
[
'old' => 'relation_end_date_high',
'new' => 'relationship_end_date_high',
],
[
'old' => 'relation_end_date_relative',
'new' => 'relationship_end_date_relative',
],
['old' => 'event_start_date_low', 'new' => 'event_low'],
['old' => 'event_end_date_high', 'new' => 'event_high'],
],
]);
$this->addTask('Update smart groups where jcalendar fields have been converted to datepicker', 'updateSmartGroups', [
'datepickerConversion' => [
'birth_date',
'deceased_date',
'case_start_date',
'case_end_date',
'mailing_job_start_date',
'relationship_start_date',
'relationship_end_date',
'event',
'relation_active_period_date',
'created_date',
'modified_date',
],
]);
// public static function taskFoo(CRM_Queue_TaskContext $ctx, ...) {
// return TRUE;
// }
$this->addTask('Convert Log date searches to their final names either created date or modified date', 'updateSmartGroups', [
'renameLogFields' => [],
]);
$this->addTask('Convert Custom data based smart groups from jcalendar to datepicker', 'updateSmartGroups', [
'convertCustomSmartGroups' => NULL,
]);
}
}
......@@ -93,49 +93,7 @@ class CRM_Upgrade_Incremental_php_FiveTwenty extends CRM_Upgrade_Incremental_Bas
}
$this->addTask(ts('Upgrade DB to %1: SQL', [1 => $rev]), 'runSql', $rev);
$this->addTask('Add "Template" contribution status', 'templateStatus');
$this->addTask('Update smart groups to rename filters on case_from and case_to to case_start_date and case_end_date', 'updateSmartGroups', [
'renameField' => [
['old' => 'case_from_relative', 'new' => 'case_start_date_relative'],
['old' => 'case_from_start_date_high', 'new' => 'case_start_date_high'],
['old' => 'case_from_start_date_low', 'new' => 'case_start_date_low'],
['old' => 'case_to_relative', 'new' => 'case_end_date_relative'],
['old' => 'case_to_end_date_high', 'new' => 'case_end_date_high'],
['old' => 'case_to_end_date_low', 'new' => 'case_end_date_low'],
['old' => 'mailing_date_relative', 'new' => 'mailing_job_start_date_relative'],
['old' => 'mailing_date_high', 'new' => 'mailing_job_start_date_high'],
['old' => 'mailing_date_low', 'new' => 'mailing_job_start_date_low'],
['old' => 'relation_start_date_low', 'new' => 'relationship_start_date_low'],
['old' => 'relation_start_date_high', 'new' => 'relationship_start_date_high'],
['old' => 'relation_start_date_relative', 'new' => 'relationship_start_date_relative'],
['old' => 'relation_end_date_low', 'new' => 'relationship_end_date_low'],
['old' => 'relation_end_date_high', 'new' => 'relationship_end_date_high'],
['old' => 'relation_end_date_relative', 'new' => 'relationship_end_date_relative'],
['old' => 'event_start_date_low', 'new' => 'event_low'],
['old' => 'event_end_date_high', 'new' => 'event_high'],
],
]);
$this->addTask('Convert Log date searches to their final names either created date or modified date', 'updateSmartGroups', [
'renameLogFields' => [],
]);
$this->addTask('Update smart groups where jcalendar fields have been converted to datepicker', 'updateSmartGroups', [
'datepickerConversion' => [
'birth_date',
'deceased_date',
'case_start_date',
'case_end_date',
'mailing_job_start_date',
'relationship_start_date',
'relationship_end_date',
'event',
'relation_active_period_date',
'created_date',
'modified_date',
],
]);
$this->addTask('Clean up unused table "civicrm_persistent"', 'dropTableIfEmpty', 'civicrm_persistent');
$this->addTask('Convert Custom data based smart groups from jcalendar to datepicker', 'updateSmartGroups', [
'convertCustomSmartGroups' => NULL,
]);
}
public static function templateStatus(CRM_Queue_TaskContext $ctx) {
......
......@@ -25,8 +25,7 @@ Released July 7, 2021
### Core CiviCRM
- **Proposal - Separation of Default Language for contacts from the default
Language (Work Towards
- **Separate the default language for contacts from the site language (Work Towards
[dev/core#2584](https://lab.civicrm.org/dev/core/-/issues/2584):
[20214](https://github.com/civicrm/civicrm-core/pull/20214))**
......@@ -37,7 +36,7 @@ Released July 7, 2021
[dev/translation#67](https://lab.civicrm.org/dev/translation/-/issues/67):
[20478](https://github.com/civicrm/civicrm-core/pull/20478))**
Defines a "Translation" `civicrm_translation` table, to represent a single
Defines a "Translation" table (`civicrm_translation`), to represent a single
translated string (e.g. a translated message-title or a translated
event-description).
......@@ -48,7 +47,7 @@ Released July 7, 2021
Creates a setting to define the number of search results to be returned.
- **Give the custom css file a 'name' to make it easier to manipulate in
- **Give the custom CSS file a 'name' to make it easier to manipulate in
hook_civicrm_alterBundle()
([20278](https://github.com/civicrm/civicrm-core/pull/20278))**
......@@ -151,7 +150,7 @@ Released July 7, 2021
- **Use PHPUnit8 in main test suites
([20370](https://github.com/civicrm/civicrm-core/pull/20370))**
Makes phpunit8 the default test runner for php versions greater than 7.2 for
Makes phpunit8 the default test runner for PHP versions greater than 7.2 for
the core test suites.
- **Link styling with default greenwich theme is not linklike on search kit
......@@ -277,7 +276,7 @@ Released July 7, 2021
[20528](https://github.com/civicrm/civicrm-core/pull/20528))**
Fixes an 'access denied' error on standalone SearchKit export forms, caused by
renaming the php classes.
renaming the PHP classes.
- **500 error saving Search Kit Smart Group sorted on aggregated field
([dev/report#68](https://lab.civicrm.org/dev/report/-/issues/68):
......@@ -291,13 +290,17 @@ Released July 7, 2021
([dev/core#2479](https://lab.civicrm.org/dev/core/-/issues/2479):
[20059](https://github.com/civicrm/civicrm-core/pull/20059))**
- **Fatal error while upgrading smart-group data
([dev/core#2659](https://lab.civicrm.org/dev/core/-/issues/2659):
[20756](https://github.com/civicrm/civicrm-core/pull/20756/))**
- **CRM_Utils_File::isAbsolute does not respect PHP stream wrappers (Work
Towards [dev/core#2590](https://lab.civicrm.org/dev/core/-/issues/2590):
[20270](https://github.com/civicrm/civicrm-core/pull/20270))**
Removes unused function.
- **Installer doesn't check mysql version properly
- **Installer doesn't check MySQL version properly
([dev/core#2602](https://lab.civicrm.org/dev/core/-/issues/2602):
[20255](https://github.com/civicrm/civicrm-core/pull/20255))**
......@@ -347,7 +350,7 @@ Released July 7, 2021
optional parameters in function declaration
([20515](https://github.com/civicrm/civicrm-core/pull/20515))**
- **[php8-compat] Fix php beautifier notice by conditionally assigning dynamic
- **[php8-compat] Fix PHP Beautifier notice by conditionally assigning dynamic
foreign key to the template
([20509](https://github.com/civicrm/civicrm-core/pull/20509))**
......@@ -360,7 +363,7 @@ Released July 7, 2021
spaceship operator
([20502](https://github.com/civicrm/civicrm-core/pull/20502))**
- **[php8-compat] fix Upgrade call back issues by making functions static and
- **[php8-compat] Fix Upgrade call back issues by making functions static and
also fixing an issue with an array key not existing when checking obsolete
extensions ([20503](https://github.com/civicrm/civicrm-core/pull/20503))**
......@@ -410,7 +413,7 @@ Released July 7, 2021
- **Fix mandatory keys check fail for value of float 0.0 in a required key in an
entity ([20342](https://github.com/civicrm/civicrm-core/pull/20342))**
- **Fix extraneous white space in generated sql
- **Fix extraneous white space in generated SQL
([20340](https://github.com/civicrm/civicrm-core/pull/20340))**
- **Fix case sensitive parameter for call to getCustomFieldTokens
......@@ -425,10 +428,10 @@ Released July 7, 2021
- **Explicitly throw an error/status bounce on Edit/New if no types.
([19840](https://github.com/civicrm/civicrm-core/pull/19840))**
- **Core_DAO - fire links_callback for all entities
- **Core_DAO - Fire links_callback for all entities
([20332](https://github.com/civicrm/civicrm-core/pull/20332))**
- **get county fields populated via api call
- **Get county fields populated via api call
([20309](https://github.com/civicrm/civicrm-core/pull/20309))**
Ensure that county fields are properly populated when calling the
......@@ -456,7 +459,7 @@ Released July 7, 2021
- **Fix delete customgroup using API4 so it removes data table
([20265](https://github.com/civicrm/civicrm-core/pull/20265))**
- **hook_managed - do not try to disable managed entities if is_active is not
- **hook_managed - Do not try to disable managed entities if is_active is not
available to api3.create
([20144](https://github.com/civicrm/civicrm-core/pull/20144))**
......@@ -656,7 +659,7 @@ Released July 7, 2021
message templates
([20520](https://github.com/civicrm/civicrm-core/pull/20520))**
- **[php8-compat] Update smarty templates and some php files to get the
- **[php8-compat] Update smarty templates and some PHP files to get the
api_v3_contribution testclass to pass on php8
([20512](https://github.com/civicrm/civicrm-core/pull/20512))**
......@@ -765,7 +768,7 @@ Released July 7, 2021
([dev/core#1744](https://lab.civicrm.org/dev/core/-/issues/1744):
[20555](https://github.com/civicrm/civicrm-core/pull/20555))**
- **[REF] extract function to get locks
- **[REF] Extract function to get locks
([20373](https://github.com/civicrm/civicrm-core/pull/20373))**
- **[REF] Remove unused variable
......@@ -777,7 +780,7 @@ Released July 7, 2021
- **[REF] Extract code to transfer groups from temp table to cache
([20435](https://github.com/civicrm/civicrm-core/pull/20435))**
- **[Ref] remove never-passed param
- **[REF] Remove never-passed param
([20456](https://github.com/civicrm/civicrm-core/pull/20456))**
- **[REF] APIv4 refactoring to support calculated fields
......@@ -786,7 +789,7 @@ Released July 7, 2021
- **[REF] Set receipt_date after sending, (from batch) not in anticipation
([20395](https://github.com/civicrm/civicrm-core/pull/20395))**
- **[REF] minor extraction - getInfoUrl
- **[REF] Minor extraction - getInfoUrl
([20421](https://github.com/civicrm/civicrm-core/pull/20421))**
- **[REF] Fix issue where by mailing urls were always stuck in the original
......@@ -799,13 +802,13 @@ Released July 7, 2021
- **[REF] Stop passing unneed params to the recur function
([20412](https://github.com/civicrm/civicrm-core/pull/20412))**
- **[REF] replace isFirst parameter
- **[REF] Replace isFirst parameter
([20411](https://github.com/civicrm/civicrm-core/pull/20411))**
- **[REF] Remove now-unused params
([20410](https://github.com/civicrm/civicrm-core/pull/20410))**
- **[REF] Paypal ipn - cleanup references to completion
- **[REF] Paypal IPN - Cleanup references to completion
([20407](https://github.com/civicrm/civicrm-core/pull/20407))**
- **[REF] Replace deprecated code call
......@@ -854,13 +857,13 @@ Released July 7, 2021
- **(REF) Regen CRM/Core/DAO/CustomField.php
([20337](https://github.com/civicrm/civicrm-core/pull/20337))**
- **[Ref] remove redundant call to clearGroupContactCache
- **[REF] Remove redundant call to clearGroupContactCache
([20243](https://github.com/civicrm/civicrm-core/pull/20243))**
- **[Ref] [tests only] replace direct calls to enable logging with calls to the
- **[REF] [tests only] Replace direct calls to enable logging with calls to the
setting ([20460](https://github.com/civicrm/civicrm-core/pull/20460))**
- **[Ref] Remove function parameter only used from test
- **[REF] Remove function parameter only used from test
([20459](https://github.com/civicrm/civicrm-core/pull/20459))**
- **[REF] Extract code determining list of groups requiring a refresh
......
......@@ -74,7 +74,8 @@ updateFile("sql/test_data_second_domain.mysql", function ($content) use ($newVer
return str_replace($oldVersion, $newVersion, $content);
});
foreach (findCoreInfoXml() as $infoXml) {
$infoXmls = findCoreInfoXml();
foreach ($infoXmls as $infoXml) {
updateXmlFile($infoXml, function (DOMDocument $dom) use ($newVersion) {
foreach ($dom->getElementsByTagName('version') as $tag) {
/** @var \DOMNode $tag */
......@@ -85,7 +86,7 @@ foreach (findCoreInfoXml() as $infoXml) {
if ($doCommit) {
$files = array_filter(
['xml/version.xml', 'sql/civicrm_generated.mysql', 'sql/test_data_second_domain.mysql', $phpFile, @$sqlFile],
array_merge(['xml/version.xml', 'sql/civicrm_generated.mysql', 'sql/test_data_second_domain.mysql', $phpFile, @$sqlFile], $infoXmls),
'file_exists'
);
$filesEsc = implode(' ', array_map('escapeshellarg', $files));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment