From 6c4940c1b9560521c6066f31537aae3440b633d5 Mon Sep 17 00:00:00 2001
From: Kevin Cristiano <kcristiano@kcristiano.com>
Date: Wed, 31 Aug 2022 08:23:13 -0400
Subject: [PATCH] civicrm release-5.52.3

---
 civicrm.php                                   |  4 +-
 .../Contribute/Import/Parser/Contribution.php | 14 ++--
 civicrm/CRM/Import/Form/Preview.php           | 76 +++++++++++--------
 civicrm/CRM/Import/Forms.php                  | 11 +++
 civicrm/CRM/Import/Parser.php                 |  2 +-
 .../CRM/Member/Import/Parser/Membership.php   |  2 +-
 civicrm/civicrm-version.php                   |  2 +-
 civicrm/ext/afform/admin/info.xml             |  2 +-
 civicrm/ext/afform/core/info.xml              |  2 +-
 civicrm/ext/afform/html/info.xml              |  2 +-
 civicrm/ext/afform/mock/info.xml              |  2 +-
 civicrm/ext/authx/info.xml                    |  2 +-
 civicrm/ext/civicrm_admin_ui/info.xml         |  2 +-
 civicrm/ext/civigrant/info.xml                |  2 +-
 civicrm/ext/ckeditor4/info.xml                |  2 +-
 .../ext/contributioncancelactions/info.xml    |  2 +-
 civicrm/ext/eventcart/info.xml                |  2 +-
 civicrm/ext/ewaysingle/info.xml               |  2 +-
 civicrm/ext/financialacls/info.xml            |  2 +-
 civicrm/ext/flexmailer/info.xml               |  2 +-
 civicrm/ext/greenwich/info.xml                |  2 +-
 civicrm/ext/legacycustomsearches/info.xml     |  2 +-
 civicrm/ext/message_admin/info.xml            |  2 +-
 civicrm/ext/oauth-client/info.xml             |  2 +-
 civicrm/ext/payflowpro/info.xml               |  2 +-
 civicrm/ext/recaptcha/info.xml                |  2 +-
 civicrm/ext/search_kit/info.xml               |  2 +-
 civicrm/ext/sequentialcreditnotes/info.xml    |  2 +-
 civicrm/release-notes.md                      |  9 +++
 civicrm/release-notes/5.52.3.md               | 39 ++++++++++
 civicrm/sql/civicrm_data.mysql                |  2 +-
 civicrm/sql/civicrm_generated.mysql           |  2 +-
 civicrm/vendor/autoload.php                   |  2 +-
 civicrm/vendor/composer/autoload_real.php     | 14 ++--
 civicrm/vendor/composer/autoload_static.php   | 12 +--
 civicrm/vendor/composer/include_paths.php     |  2 +-
 civicrm/vendor/composer/installed.php         |  4 +-
 civicrm/xml/version.xml                       |  2 +-
 38 files changed, 157 insertions(+), 84 deletions(-)
 create mode 100644 civicrm/release-notes/5.52.3.md

diff --git a/civicrm.php b/civicrm.php
index 77feb677db..6d969a193d 100644
--- a/civicrm.php
+++ b/civicrm.php
@@ -2,7 +2,7 @@
 /**
  * Plugin Name: CiviCRM
  * Description: CiviCRM - Growing and Sustaining Relationships
- * Version: 5.52.2
+ * Version: 5.52.3
  * Requires at least: 4.9
  * Requires PHP:      7.2
  * Author: CiviCRM LLC
@@ -36,7 +36,7 @@ if (!defined('ABSPATH')) {
 }
 
 // Set version here: changing it forces Javascript and CSS to reload.
-define('CIVICRM_PLUGIN_VERSION', '5.52.2');
+define('CIVICRM_PLUGIN_VERSION', '5.52.3');
 
 // Store reference to this file.
 if (!defined('CIVICRM_PLUGIN_FILE')) {
diff --git a/civicrm/CRM/Contribute/Import/Parser/Contribution.php b/civicrm/CRM/Contribute/Import/Parser/Contribution.php
index 9c4a4bbd24..eed146f4cb 100644
--- a/civicrm/CRM/Contribute/Import/Parser/Contribution.php
+++ b/civicrm/CRM/Contribute/Import/Parser/Contribution.php
@@ -306,7 +306,7 @@ class CRM_Contribute_Import_Parser_Contribution extends CRM_Import_Parser {
         $paramValues['contact_type'] = $this->getContactType();
       }
       elseif ($this->isUpdateExisting() &&
-        (!empty($paramValues['contribution_id']) || !empty($values['trxn_id']) || !empty($paramValues['invoice_id']))
+        (!empty($paramValues['id']) || !empty($values['trxn_id']) || !empty($paramValues['invoice_id']))
       ) {
         $paramValues['contact_type'] = $this->getContactType();
       }
@@ -329,9 +329,9 @@ class CRM_Contribute_Import_Parser_Contribution extends CRM_Import_Parser {
       if ($this->isUpdateExisting()) {
         //fix for CRM-2219 - Update Contribution
         // onDuplicate == CRM_Import_Parser::DUPLICATE_UPDATE
-        if (!empty($paramValues['invoice_id']) || !empty($paramValues['trxn_id']) || !empty($paramValues['contribution_id'])) {
+        if (!empty($paramValues['invoice_id']) || !empty($paramValues['trxn_id']) || !empty($paramValues['id'])) {
           $dupeIds = [
-            'id' => $paramValues['contribution_id'] ?? NULL,
+            'id' => $paramValues['id'] ?? NULL,
             'trxn_id' => $paramValues['trxn_id'] ?? NULL,
             'invoice_id' => $paramValues['invoice_id'] ?? NULL,
           ];
@@ -684,12 +684,14 @@ class CRM_Contribute_Import_Parser_Contribution extends CRM_Import_Parser {
               $params['contribution_contact_id'] = $matchingContactIds[0];
             }
           }
-          elseif (!empty($params['contribution_id']) || !empty($params['trxn_id']) || !empty($params['invoice_id'])) {
+          elseif (!empty($params['id']) || !empty($params['trxn_id']) || !empty($params['invoice_id'])) {
             // when update mode check contribution id or trxn id or
             // invoice id
+            // @todo - this check is obsolete. It survives for now
+            // in order to keep the rc patch small & non-conflicty.
             $contactId = new CRM_Contribute_DAO_Contribution();
-            if (!empty($params['contribution_id'])) {
-              $contactId->id = $params['contribution_id'];
+            if (!empty($params['id'])) {
+              $contactId->id = $params['id'];
             }
             elseif (!empty($params['trxn_id'])) {
               $contactId->trxn_id = $params['trxn_id'];
diff --git a/civicrm/CRM/Import/Form/Preview.php b/civicrm/CRM/Import/Form/Preview.php
index 5fff559d0a..693a612f46 100644
--- a/civicrm/CRM/Import/Form/Preview.php
+++ b/civicrm/CRM/Import/Form/Preview.php
@@ -43,38 +43,7 @@ abstract class CRM_Import_Form_Preview extends CRM_Import_Forms {
    * Build the form object.
    */
   public function buildQuickForm() {
-
-    // FIXME: This is a hack...
-    // The tpl contains javascript that starts the import on form submit
-    // Since our back/cancel buttons are of html type "submit" we have to prevent a form submit event when they are clicked
-    // Hacking in some onclick js to make them act more like links instead of buttons
-    $path = CRM_Utils_System::currentPath();
-    $query = ['_qf_MapField_display' => 'true'];
-    $qfKey = CRM_Utils_Request::retrieve('qfKey', 'String');
-    if (CRM_Utils_Rule::qfKey($qfKey)) {
-      $query['qfKey'] = $qfKey;
-    }
-    $previousURL = CRM_Utils_System::url($path, $query, FALSE, NULL, FALSE);
-    $cancelURL = CRM_Utils_System::url($path, 'reset=1', FALSE, NULL, FALSE);
-
-    $this->addButtons([
-      [
-        'type' => 'back',
-        'name' => ts('Previous'),
-        'js' => ['onclick' => "location.href='{$previousURL}'; return false;"],
-      ],
-      [
-        'type' => 'next',
-        'name' => ts('Import Now'),
-        'spacing' => '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;',
-        'isDefault' => TRUE,
-      ],
-      [
-        'type' => 'cancel',
-        'name' => ts('Cancel'),
-        'js' => ['onclick' => "location.href='{$cancelURL}'; return false;"],
-      ],
-    ]);
+    $this->addButtons($this->getButtons());
   }
 
   /**
@@ -146,4 +115,47 @@ abstract class CRM_Import_Form_Preview extends CRM_Import_Forms {
     $runner->runAllViaWeb();
   }
 
+  /**
+   * Get the buttons for the form.
+   *
+   * @return array|array[]
+   * @throws \CRM_Core_Exception
+   */
+  private function getButtons(): array {
+    // FIXME: This is a hack...
+    // The tpl contains javascript that starts the import on form submit
+    // Since our back/cancel buttons are of html type "submit" we have to prevent a form submit event when they are clicked
+    // Hacking in some onclick js to make them act more like links instead of buttons
+    $path = CRM_Utils_System::currentPath();
+    $query = ['_qf_MapField_display' => 'true'];
+    $qfKey = CRM_Utils_Request::retrieve('qfKey', 'String');
+    if (CRM_Utils_Rule::qfKey($qfKey)) {
+      $query['qfKey'] = $qfKey;
+    }
+    $previousURL = CRM_Utils_System::url($path, $query, FALSE, NULL, FALSE);
+    $cancelURL = CRM_Utils_System::url($path, 'reset=1', FALSE, NULL, FALSE);
+    $buttons = [
+      [
+        'type' => 'back',
+        'name' => ts('Previous'),
+        'js' => ['onclick' => "location.href='{$previousURL}'; return false;"],
+      ],
+    ];
+    if ($this->hasImportableRows()) {
+      $buttons[] = [
+        'type' => 'next',
+        'name' => ts('Import Now'),
+        'spacing' => '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;',
+        'isDefault' => TRUE,
+      ];
+    }
+    $buttons[] = [
+      'type' => 'cancel',
+      'name' => ts('Cancel'),
+      'js' => ['onclick' => "location.href='{$cancelURL}'; return false;"],
+    ];
+
+    return $buttons;
+  }
+
 }
diff --git a/civicrm/CRM/Import/Forms.php b/civicrm/CRM/Import/Forms.php
index c9636b25bc..a274f8ceb2 100644
--- a/civicrm/CRM/Import/Forms.php
+++ b/civicrm/CRM/Import/Forms.php
@@ -683,4 +683,15 @@ class CRM_Import_Forms extends CRM_Core_Form {
     return ((int) $this->getSubmittedValue('onDuplicate')) === CRM_Import_Parser::DUPLICATE_SKIP;
   }
 
+  /**
+   * Are there valid rows to import.
+   *
+   * @return bool
+   *
+   * @throws \CRM_Core_Exception
+   */
+  protected function hasImportableRows(): bool {
+    return (bool) $this->getRowCount(['new']);
+  }
+
 }
diff --git a/civicrm/CRM/Import/Parser.php b/civicrm/CRM/Import/Parser.php
index 08c779f045..836d424ce9 100644
--- a/civicrm/CRM/Import/Parser.php
+++ b/civicrm/CRM/Import/Parser.php
@@ -1301,7 +1301,7 @@ abstract class CRM_Import_Parser implements UserJobInterface {
       }
       else {
         foreach ($required as $field => $label) {
-          if (empty($params[$field])) {
+          if (!isset($params[$field]) || $params[$field] === '') {
             $missing[$field] = $label;
           }
         }
diff --git a/civicrm/CRM/Member/Import/Parser/Membership.php b/civicrm/CRM/Member/Import/Parser/Membership.php
index 5c6dbc9b22..51cd93dcc1 100644
--- a/civicrm/CRM/Member/Import/Parser/Membership.php
+++ b/civicrm/CRM/Member/Import/Parser/Membership.php
@@ -461,7 +461,7 @@ class CRM_Member_Import_Parser_Membership extends CRM_Import_Parser {
    * @return string[]
    */
   protected function getOddlyMappedMetadataFields(): array {
-    $uniqueNames = ['membership_id', 'membership_contact_id'];
+    $uniqueNames = ['membership_id', 'membership_contact_id', 'membership_start_date', 'membership_join_date', 'membership_end_date', 'membership_source', 'member_is_override', 'member_is_test', 'member_is_pay_later', 'member_campaign_id'];
     $fields = [];
     foreach ($uniqueNames as $name) {
       $fields[$this->importableFieldsMetadata[$name]['name']] = $name;
diff --git a/civicrm/civicrm-version.php b/civicrm/civicrm-version.php
index 309d56c625..e70604aeed 100644
--- a/civicrm/civicrm-version.php
+++ b/civicrm/civicrm-version.php
@@ -1,7 +1,7 @@
 <?php
 /** @deprecated */
 function civicrmVersion( ) {
-  return array( 'version'  => '5.52.2',
+  return array( 'version'  => '5.52.3',
                 'cms'      => 'Wordpress',
                 'revision' => '' );
 }
diff --git a/civicrm/ext/afform/admin/info.xml b/civicrm/ext/afform/admin/info.xml
index 6bf0918168..a07e3a29eb 100644
--- a/civicrm/ext/afform/admin/info.xml
+++ b/civicrm/ext/afform/admin/info.xml
@@ -13,7 +13,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2020-01-09</releaseDate>
-  <version>5.52.2</version>
+  <version>5.52.3</version>
   <develStage>beta</develStage>
   <compatibility>
     <ver>5.52</ver>
diff --git a/civicrm/ext/afform/core/info.xml b/civicrm/ext/afform/core/info.xml
index b2e2d0756a..1585d67c3a 100644
--- a/civicrm/ext/afform/core/info.xml
+++ b/civicrm/ext/afform/core/info.xml
@@ -13,7 +13,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2020-01-09</releaseDate>
-  <version>5.52.2</version>
+  <version>5.52.3</version>
   <develStage>beta</develStage>
   <compatibility>
     <ver>5.52</ver>
diff --git a/civicrm/ext/afform/html/info.xml b/civicrm/ext/afform/html/info.xml
index 53efa66445..c59dc16fb2 100644
--- a/civicrm/ext/afform/html/info.xml
+++ b/civicrm/ext/afform/html/info.xml
@@ -13,7 +13,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2020-01-09</releaseDate>
-  <version>5.52.2</version>
+  <version>5.52.3</version>
   <develStage>alpha</develStage>
   <compatibility>
     <ver>5.52</ver>
diff --git a/civicrm/ext/afform/mock/info.xml b/civicrm/ext/afform/mock/info.xml
index bf4aea22fb..71bf118f78 100644
--- a/civicrm/ext/afform/mock/info.xml
+++ b/civicrm/ext/afform/mock/info.xml
@@ -12,7 +12,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2020-01-09</releaseDate>
-  <version>5.52.2</version>
+  <version>5.52.3</version>
   <tags>
     <tag>mgmt:hidden</tag>
   </tags>
diff --git a/civicrm/ext/authx/info.xml b/civicrm/ext/authx/info.xml
index c6e85e7177..2186abbf7c 100644
--- a/civicrm/ext/authx/info.xml
+++ b/civicrm/ext/authx/info.xml
@@ -15,7 +15,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2021-02-11</releaseDate>
-  <version>5.52.2</version>
+  <version>5.52.3</version>
   <develStage>stable</develStage>
   <compatibility>
     <ver>5.52</ver>
diff --git a/civicrm/ext/civicrm_admin_ui/info.xml b/civicrm/ext/civicrm_admin_ui/info.xml
index 2d847b7dab..f80ab8bddf 100644
--- a/civicrm/ext/civicrm_admin_ui/info.xml
+++ b/civicrm/ext/civicrm_admin_ui/info.xml
@@ -15,7 +15,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2022-01-02</releaseDate>
-  <version>5.52.2</version>
+  <version>5.52.3</version>
   <develStage>alpha</develStage>
   <compatibility>
     <ver>5.52</ver>
diff --git a/civicrm/ext/civigrant/info.xml b/civicrm/ext/civigrant/info.xml
index 7c5185fe30..db6410c752 100644
--- a/civicrm/ext/civigrant/info.xml
+++ b/civicrm/ext/civigrant/info.xml
@@ -13,7 +13,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2021-11-11</releaseDate>
-  <version>5.52.2</version>
+  <version>5.52.3</version>
   <develStage>stable</develStage>
   <compatibility>
     <ver>5.52</ver>
diff --git a/civicrm/ext/ckeditor4/info.xml b/civicrm/ext/ckeditor4/info.xml
index 71aa3fb521..7bec6292de 100644
--- a/civicrm/ext/ckeditor4/info.xml
+++ b/civicrm/ext/ckeditor4/info.xml
@@ -15,7 +15,7 @@
     <url desc="Licensing">https://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2021-05-23</releaseDate>
-  <version>5.52.2</version>
+  <version>5.52.3</version>
   <develStage>stable</develStage>
   <compatibility>
     <ver>5.52</ver>
diff --git a/civicrm/ext/contributioncancelactions/info.xml b/civicrm/ext/contributioncancelactions/info.xml
index 4fe42e753a..ab3f5b2f78 100644
--- a/civicrm/ext/contributioncancelactions/info.xml
+++ b/civicrm/ext/contributioncancelactions/info.xml
@@ -15,7 +15,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2020-10-12</releaseDate>
-  <version>5.52.2</version>
+  <version>5.52.3</version>
   <develStage>stable</develStage>
   <compatibility>
     <ver>5.52</ver>
diff --git a/civicrm/ext/eventcart/info.xml b/civicrm/ext/eventcart/info.xml
index 3ca17a2ed6..c34f54451f 100644
--- a/civicrm/ext/eventcart/info.xml
+++ b/civicrm/ext/eventcart/info.xml
@@ -13,7 +13,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2020-08-03</releaseDate>
-  <version>5.52.2</version>
+  <version>5.52.3</version>
   <tags>
     <tag>mgmt:hidden</tag>
   </tags>
diff --git a/civicrm/ext/ewaysingle/info.xml b/civicrm/ext/ewaysingle/info.xml
index 497e7d901d..00c324e5bd 100644
--- a/civicrm/ext/ewaysingle/info.xml
+++ b/civicrm/ext/ewaysingle/info.xml
@@ -15,7 +15,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2020-10-07</releaseDate>
-  <version>5.52.2</version>
+  <version>5.52.3</version>
   <tags>
     <tag>mgmt:hidden</tag>
   </tags>
diff --git a/civicrm/ext/financialacls/info.xml b/civicrm/ext/financialacls/info.xml
index 97342b2520..36bfca148b 100644
--- a/civicrm/ext/financialacls/info.xml
+++ b/civicrm/ext/financialacls/info.xml
@@ -15,7 +15,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2020-08-27</releaseDate>
-  <version>5.52.2</version>
+  <version>5.52.3</version>
   <develStage>stable</develStage>
   <compatibility>
     <ver>5.52</ver>
diff --git a/civicrm/ext/flexmailer/info.xml b/civicrm/ext/flexmailer/info.xml
index 5b38bcd081..a36a0b2a04 100644
--- a/civicrm/ext/flexmailer/info.xml
+++ b/civicrm/ext/flexmailer/info.xml
@@ -15,7 +15,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2020-08-05</releaseDate>
-  <version>5.52.2</version>
+  <version>5.52.3</version>
   <develStage>stable</develStage>
   <comments>
     FlexMailer is an email delivery engine which replaces the internal guts
diff --git a/civicrm/ext/greenwich/info.xml b/civicrm/ext/greenwich/info.xml
index 9163a10727..54f28edf37 100644
--- a/civicrm/ext/greenwich/info.xml
+++ b/civicrm/ext/greenwich/info.xml
@@ -15,7 +15,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2020-07-21</releaseDate>
-  <version>5.52.2</version>
+  <version>5.52.3</version>
   <tags>
     <tag>mgmt:hidden</tag>
   </tags>
diff --git a/civicrm/ext/legacycustomsearches/info.xml b/civicrm/ext/legacycustomsearches/info.xml
index f1fed806a8..4cd2e2708c 100644
--- a/civicrm/ext/legacycustomsearches/info.xml
+++ b/civicrm/ext/legacycustomsearches/info.xml
@@ -15,7 +15,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2021-07-25</releaseDate>
-  <version>5.52.2</version>
+  <version>5.52.3</version>
   <develStage>stable</develStage>
   <tags>
     <tag>mgmt:hidden</tag>
diff --git a/civicrm/ext/message_admin/info.xml b/civicrm/ext/message_admin/info.xml
index be743ea559..dabf0179ab 100644
--- a/civicrm/ext/message_admin/info.xml
+++ b/civicrm/ext/message_admin/info.xml
@@ -15,7 +15,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2021-06-12</releaseDate>
-  <version>5.52.2</version>
+  <version>5.52.3</version>
   <tags>
     <tag>mgmt:hidden</tag>
   </tags>
diff --git a/civicrm/ext/oauth-client/info.xml b/civicrm/ext/oauth-client/info.xml
index ef8cac69b4..822ae75403 100644
--- a/civicrm/ext/oauth-client/info.xml
+++ b/civicrm/ext/oauth-client/info.xml
@@ -15,7 +15,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2020-10-23</releaseDate>
-  <version>5.52.2</version>
+  <version>5.52.3</version>
   <develStage>stable</develStage>
   <compatibility>
     <ver>5.52</ver>
diff --git a/civicrm/ext/payflowpro/info.xml b/civicrm/ext/payflowpro/info.xml
index 15ca99453b..1673c4d3c0 100644
--- a/civicrm/ext/payflowpro/info.xml
+++ b/civicrm/ext/payflowpro/info.xml
@@ -15,7 +15,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2021-04-13</releaseDate>
-  <version>5.52.2</version>
+  <version>5.52.3</version>
   <develStage>stable</develStage>
   <compatibility>
     <ver>5.52</ver>
diff --git a/civicrm/ext/recaptcha/info.xml b/civicrm/ext/recaptcha/info.xml
index ae457876e9..a7e315748d 100644
--- a/civicrm/ext/recaptcha/info.xml
+++ b/civicrm/ext/recaptcha/info.xml
@@ -13,7 +13,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2021-04-03</releaseDate>
-  <version>5.52.2</version>
+  <version>5.52.3</version>
   <tags>
     <tag>mgmt:hidden</tag>
   </tags>
diff --git a/civicrm/ext/search_kit/info.xml b/civicrm/ext/search_kit/info.xml
index 3df3a28760..1f9f5079f2 100644
--- a/civicrm/ext/search_kit/info.xml
+++ b/civicrm/ext/search_kit/info.xml
@@ -15,7 +15,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2021-01-06</releaseDate>
-  <version>5.52.2</version>
+  <version>5.52.3</version>
   <develStage>stable</develStage>
   <compatibility>
     <ver>5.52</ver>
diff --git a/civicrm/ext/sequentialcreditnotes/info.xml b/civicrm/ext/sequentialcreditnotes/info.xml
index 85cd08eda9..c14e42f324 100644
--- a/civicrm/ext/sequentialcreditnotes/info.xml
+++ b/civicrm/ext/sequentialcreditnotes/info.xml
@@ -15,7 +15,7 @@
     <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
   </urls>
   <releaseDate>2020-01-28</releaseDate>
-  <version>5.52.2</version>
+  <version>5.52.3</version>
   <tags>
     <tag>mgmt:hidden</tag>
   </tags>
diff --git a/civicrm/release-notes.md b/civicrm/release-notes.md
index 3de4fc5354..c50834843f 100644
--- a/civicrm/release-notes.md
+++ b/civicrm/release-notes.md
@@ -15,6 +15,15 @@ Other resources for identifying changes are:
     * https://github.com/civicrm/civicrm-joomla
     * https://github.com/civicrm/civicrm-wordpress
 
+## CiviCRM 5.52.3
+
+Released August 30, 2022
+
+- **[Synopsis](release-notes/5.52.3.md#synopsis)**
+- **[Bugs resolved](release-notes/5.52.3.md#bugs)**
+- **[Credits](release-notes/5.52.3.md#credits)**
+- **[Feedback](release-notes/5.52.3.md#feedback)**
+
 ## CiviCRM 5.52.2
 
 Released August 12, 2022
diff --git a/civicrm/release-notes/5.52.3.md b/civicrm/release-notes/5.52.3.md
new file mode 100644
index 0000000000..907ab9bd0a
--- /dev/null
+++ b/civicrm/release-notes/5.52.3.md
@@ -0,0 +1,39 @@
+# CiviCRM 5.52.3
+
+Released August 30, 2022
+
+- **[Synopsis](#synopsis)**
+- **[Bugs resolved](#bugs)**
+- **[Credits](#credits)**
+- **[Feedback](#feedback)**
+
+## <a name="synopsis"></a>Synopsis
+
+| *Does this version...?*                                         |          |
+| --------------------------------------------------------------- | -------- |
+| Change the database schema?                                     | no       |
+| Alter the API?                                                  | no       |
+| Require attention to configuration options?                     | no       |
+| Fix problems installing or upgrading to a previous version?     | no       |
+| Introduce features?                                             | no       |
+| **Fix bugs?**                                                   | **yes**  |
+
+## <a name="bugs"></a>Bugs resolved
+
+* **_CiviContribute_: Fix import error "No matching Contact found for ()" ([dev/core#3820](https://lab.civicrm.org/dev/core/-/issues/3820): [#24366](https://github.com/civicrm/civicrm-core/pull/24366))**
+* **_CiviContribute_: Restore support for importing "total_amount=0" ([dev/core#3828](https://lab.civicrm.org/dev/core/-/issues/3828): [#24414](https://github.com/civicrm/civicrm-core/pull/24414))**
+* **_CiviMember_: Fix import error regarding "getFieldMetadata()" ([#24349](https://github.com/civicrm/civicrm-core/pull/24349))**
+* **_Importer_: Disable "Import" button if batch contains no importable data ([#24346](https://github.com/civicrm/civicrm-core/pull/24346))**
+
+## <a name="credits"></a>Credits
+
+This release was developed by the following authors and reviewers:
+
+Wikimedia Foundation - Eileen McNaughton; Tobias Krause; JMA Consulting - Seamus Lee;
+Digitalcourage - Detlev Sieber; Dave D; CiviCRM - Tim Otten
+
+## <a name="feedback"></a>Feedback
+
+These release notes are edited by Tim Otten and Andie Hunt.  If you'd like to
+provide feedback on them, please login to https://chat.civicrm.org/civicrm and
+contact `@agh1`.
diff --git a/civicrm/sql/civicrm_data.mysql b/civicrm/sql/civicrm_data.mysql
index 4222dad52b..2238b7ac9d 100644
--- a/civicrm/sql/civicrm_data.mysql
+++ b/civicrm/sql/civicrm_data.mysql
@@ -23825,4 +23825,4 @@ INSERT INTO `civicrm_report_instance`
     ( `domain_id`, `title`, `report_id`, `description`, `permission`, `form_values`)
 VALUES
     (  @domainID, 'Survey Details', 'survey/detail', 'Detailed report for canvassing, phone-banking, walk lists or other surveys.', 'access CiviReport', 'a:39:{s:6:"fields";a:2:{s:9:"sort_name";s:1:"1";s:6:"result";s:1:"1";}s:22:"assignee_contact_id_op";s:2:"eq";s:25:"assignee_contact_id_value";s:0:"";s:12:"sort_name_op";s:3:"has";s:15:"sort_name_value";s:0:"";s:17:"street_number_min";s:0:"";s:17:"street_number_max";s:0:"";s:16:"street_number_op";s:3:"lte";s:19:"street_number_value";s:0:"";s:14:"street_name_op";s:3:"has";s:17:"street_name_value";s:0:"";s:15:"postal_code_min";s:0:"";s:15:"postal_code_max";s:0:"";s:14:"postal_code_op";s:3:"lte";s:17:"postal_code_value";s:0:"";s:7:"city_op";s:3:"has";s:10:"city_value";s:0:"";s:20:"state_province_id_op";s:2:"in";s:23:"state_province_id_value";a:0:{}s:13:"country_id_op";s:2:"in";s:16:"country_id_value";a:0:{}s:12:"survey_id_op";s:2:"in";s:15:"survey_id_value";a:0:{}s:12:"status_id_op";s:2:"eq";s:15:"status_id_value";s:1:"1";s:11:"custom_1_op";s:2:"in";s:14:"custom_1_value";a:0:{}s:11:"custom_2_op";s:2:"in";s:14:"custom_2_value";a:0:{}s:17:"custom_3_relative";s:1:"0";s:13:"custom_3_from";s:0:"";s:11:"custom_3_to";s:0:"";s:11:"description";s:75:"Detailed report for canvassing, phone-banking, walk lists or other surveys.";s:13:"email_subject";s:0:"";s:8:"email_to";s:0:"";s:8:"email_cc";s:0:"";s:10:"permission";s:17:"access CiviReport";s:6:"groups";s:0:"";s:9:"domain_id";i:1;}');
-UPDATE civicrm_domain SET version = '5.52.2';
+UPDATE civicrm_domain SET version = '5.52.3';
diff --git a/civicrm/sql/civicrm_generated.mysql b/civicrm/sql/civicrm_generated.mysql
index dfedb01308..cf5bbc3c99 100644
--- a/civicrm/sql/civicrm_generated.mysql
+++ b/civicrm/sql/civicrm_generated.mysql
@@ -2915,7 +2915,7 @@ UNLOCK TABLES;
 LOCK TABLES `civicrm_domain` WRITE;
 /*!40000 ALTER TABLE `civicrm_domain` DISABLE KEYS */;
 INSERT INTO `civicrm_domain` (`id`, `name`, `description`, `version`, `contact_id`, `locales`, `locale_custom_strings`) VALUES
- (1,'Default Domain Name',NULL,'5.52.2',1,NULL,'a:1:{s:5:\"en_US\";a:0:{}}');
+ (1,'Default Domain Name',NULL,'5.52.3',1,NULL,'a:1:{s:5:\"en_US\";a:0:{}}');
 /*!40000 ALTER TABLE `civicrm_domain` ENABLE KEYS */;
 UNLOCK TABLES;
 
diff --git a/civicrm/vendor/autoload.php b/civicrm/vendor/autoload.php
index 569ccb8ad7..c6ba03947c 100644
--- a/civicrm/vendor/autoload.php
+++ b/civicrm/vendor/autoload.php
@@ -9,4 +9,4 @@ if (PHP_VERSION_ID < 50600) {
 
 require_once __DIR__ . '/composer/autoload_real.php';
 
-return ComposerAutoloaderInit164137b64ea9df92f079b3120f5ce8b4::getLoader();
+return ComposerAutoloaderInitdd5c8343fef6ba97439bf947c775e780::getLoader();
diff --git a/civicrm/vendor/composer/autoload_real.php b/civicrm/vendor/composer/autoload_real.php
index 0176e60614..721e52250a 100644
--- a/civicrm/vendor/composer/autoload_real.php
+++ b/civicrm/vendor/composer/autoload_real.php
@@ -2,7 +2,7 @@
 
 // autoload_real.php @generated by Composer
 
-class ComposerAutoloaderInit164137b64ea9df92f079b3120f5ce8b4
+class ComposerAutoloaderInitdd5c8343fef6ba97439bf947c775e780
 {
     private static $loader;
 
@@ -24,22 +24,22 @@ class ComposerAutoloaderInit164137b64ea9df92f079b3120f5ce8b4
 
         require __DIR__ . '/platform_check.php';
 
-        spl_autoload_register(array('ComposerAutoloaderInit164137b64ea9df92f079b3120f5ce8b4', 'loadClassLoader'), true, true);
+        spl_autoload_register(array('ComposerAutoloaderInitdd5c8343fef6ba97439bf947c775e780', 'loadClassLoader'), true, true);
         self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
-        spl_autoload_unregister(array('ComposerAutoloaderInit164137b64ea9df92f079b3120f5ce8b4', 'loadClassLoader'));
+        spl_autoload_unregister(array('ComposerAutoloaderInitdd5c8343fef6ba97439bf947c775e780', 'loadClassLoader'));
 
         $includePaths = require __DIR__ . '/include_paths.php';
         $includePaths[] = get_include_path();
         set_include_path(implode(PATH_SEPARATOR, $includePaths));
 
         require __DIR__ . '/autoload_static.php';
-        call_user_func(\Composer\Autoload\ComposerStaticInit164137b64ea9df92f079b3120f5ce8b4::getInitializer($loader));
+        call_user_func(\Composer\Autoload\ComposerStaticInitdd5c8343fef6ba97439bf947c775e780::getInitializer($loader));
 
         $loader->register(true);
 
-        $includeFiles = \Composer\Autoload\ComposerStaticInit164137b64ea9df92f079b3120f5ce8b4::$files;
+        $includeFiles = \Composer\Autoload\ComposerStaticInitdd5c8343fef6ba97439bf947c775e780::$files;
         foreach ($includeFiles as $fileIdentifier => $file) {
-            composerRequire164137b64ea9df92f079b3120f5ce8b4($fileIdentifier, $file);
+            composerRequiredd5c8343fef6ba97439bf947c775e780($fileIdentifier, $file);
         }
 
         return $loader;
@@ -51,7 +51,7 @@ class ComposerAutoloaderInit164137b64ea9df92f079b3120f5ce8b4
  * @param string $file
  * @return void
  */
-function composerRequire164137b64ea9df92f079b3120f5ce8b4($fileIdentifier, $file)
+function composerRequiredd5c8343fef6ba97439bf947c775e780($fileIdentifier, $file)
 {
     if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
         $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
diff --git a/civicrm/vendor/composer/autoload_static.php b/civicrm/vendor/composer/autoload_static.php
index 0b5cf0b3be..a3e9c51665 100644
--- a/civicrm/vendor/composer/autoload_static.php
+++ b/civicrm/vendor/composer/autoload_static.php
@@ -4,7 +4,7 @@
 
 namespace Composer\Autoload;
 
-class ComposerStaticInit164137b64ea9df92f079b3120f5ce8b4
+class ComposerStaticInitdd5c8343fef6ba97439bf947c775e780
 {
     public static $files = array (
         'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php',
@@ -722,11 +722,11 @@ class ComposerStaticInit164137b64ea9df92f079b3120f5ce8b4
     public static function getInitializer(ClassLoader $loader)
     {
         return \Closure::bind(function () use ($loader) {
-            $loader->prefixLengthsPsr4 = ComposerStaticInit164137b64ea9df92f079b3120f5ce8b4::$prefixLengthsPsr4;
-            $loader->prefixDirsPsr4 = ComposerStaticInit164137b64ea9df92f079b3120f5ce8b4::$prefixDirsPsr4;
-            $loader->prefixesPsr0 = ComposerStaticInit164137b64ea9df92f079b3120f5ce8b4::$prefixesPsr0;
-            $loader->fallbackDirsPsr0 = ComposerStaticInit164137b64ea9df92f079b3120f5ce8b4::$fallbackDirsPsr0;
-            $loader->classMap = ComposerStaticInit164137b64ea9df92f079b3120f5ce8b4::$classMap;
+            $loader->prefixLengthsPsr4 = ComposerStaticInitdd5c8343fef6ba97439bf947c775e780::$prefixLengthsPsr4;
+            $loader->prefixDirsPsr4 = ComposerStaticInitdd5c8343fef6ba97439bf947c775e780::$prefixDirsPsr4;
+            $loader->prefixesPsr0 = ComposerStaticInitdd5c8343fef6ba97439bf947c775e780::$prefixesPsr0;
+            $loader->fallbackDirsPsr0 = ComposerStaticInitdd5c8343fef6ba97439bf947c775e780::$fallbackDirsPsr0;
+            $loader->classMap = ComposerStaticInitdd5c8343fef6ba97439bf947c775e780::$classMap;
 
         }, null, ClassLoader::class);
     }
diff --git a/civicrm/vendor/composer/include_paths.php b/civicrm/vendor/composer/include_paths.php
index 5386e5c830..c1d457fc4f 100644
--- a/civicrm/vendor/composer/include_paths.php
+++ b/civicrm/vendor/composer/include_paths.php
@@ -11,11 +11,11 @@ return array(
     $vendorDir . '/pear/auth_sasl',
     $vendorDir . '/pear/console_getopt',
     $vendorDir . '/pear/pear-core-minimal/src',
+    $vendorDir . '/pear/net_socket',
     $vendorDir . '/pear/db',
     $vendorDir . '/pear/log',
     $vendorDir . '/pear/mail',
     $vendorDir . '/pear/mail_mime',
-    $vendorDir . '/pear/net_socket',
     $vendorDir . '/pear/net_smtp',
     $vendorDir . '/pear/validate_finance_creditcard',
 );
diff --git a/civicrm/vendor/composer/installed.php b/civicrm/vendor/composer/installed.php
index c07aa1899d..fc355bc382 100644
--- a/civicrm/vendor/composer/installed.php
+++ b/civicrm/vendor/composer/installed.php
@@ -3,7 +3,7 @@
         'name' => 'civicrm/civicrm-core',
         'pretty_version' => '5.52.x-dev',
         'version' => '5.52.9999999.9999999-dev',
-        'reference' => 'a9faea2c39a8c34f98a86f117df10cfafedfa560',
+        'reference' => '5a183fd9f043bde7067a5fddbf681056094bf615',
         'type' => 'library',
         'install_path' => __DIR__ . '/../../',
         'aliases' => array(),
@@ -58,7 +58,7 @@
         'civicrm/civicrm-core' => array(
             'pretty_version' => '5.52.x-dev',
             'version' => '5.52.9999999.9999999-dev',
-            'reference' => 'a9faea2c39a8c34f98a86f117df10cfafedfa560',
+            'reference' => '5a183fd9f043bde7067a5fddbf681056094bf615',
             'type' => 'library',
             'install_path' => __DIR__ . '/../../',
             'aliases' => array(),
diff --git a/civicrm/xml/version.xml b/civicrm/xml/version.xml
index a1b080f489..56dc2f9165 100644
--- a/civicrm/xml/version.xml
+++ b/civicrm/xml/version.xml
@@ -1,4 +1,4 @@
 <?xml version="1.0" encoding="iso-8859-1" ?>
 <version>
-  <version_no>5.52.2</version_no>
+  <version_no>5.52.3</version_no>
 </version>
-- 
GitLab