Enotice fix
authorEileen McNaughton <emcnaughton@wikimedia.org>
Sat, 4 Jun 2022 09:15:34 +0000 (21:15 +1200)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Mon, 6 Jun 2022 04:46:38 +0000 (16:46 +1200)
Enotice fix

CRM/Contact/Import/Parser/Contact.php
CRM/Member/Import/Form/MapField.php
CRM/Member/Import/Parser/Membership.php

index a1b98e4b71cc6e612cea6e83e407596a29bbd6b8..83777cc257943687922afce31d31f89cba4502e3 100644 (file)
@@ -77,6 +77,8 @@ class CRM_Contact_Import_Parser_Contact extends CRM_Import_Parser {
    * The initializer code, called before processing.
    */
   public function init() {
+    // Force re-load of user job.
+    unset($this->userJob);
     $this->setFieldMetadata();
     foreach ($this->getImportableFieldsMetadata() as $name => $field) {
       $this->addField($name, $field['title'], CRM_Utils_Array::value('type', $field), CRM_Utils_Array::value('headerPattern', $field), CRM_Utils_Array::value('dataPattern', $field), CRM_Utils_Array::value('hasLocationType', $field));
index 5d2ba587d832aafdd7b2e88f64b5408889869cc7..795f39267833b1ce1b0790dac8b045947645c814 100644 (file)
@@ -61,7 +61,7 @@ class CRM_Member_Import_Form_MapField extends CRM_Import_Form_MapField {
     foreach ($columnHeaders as $i => $columnHeader) {
       $sel = &$this->addElement('hierselect', "mapper[$i]", ts('Mapper for Field %1', array(1 => $i)), NULL);
       $jsSet = FALSE;
-      if ($this->get('savedMapping')) {
+      if ($this->getSubmittedValue('savedMapping')) {
         if (isset($mappingName[$i])) {
           if ($mappingName[$i] != ts('do_not_import')) {
             //When locationType is not set
index 9ceda1d478648ad64780d7469b4970290a2677c6..67fa939784cdf26d3a2b65f57d943805d1cd85b9 100644 (file)
@@ -254,6 +254,8 @@ class CRM_Member_Import_Parser_Membership extends CRM_Import_Parser {
    * @return void
    */
   public function init() {
+    // Force re-load of user job.
+    unset($this->userJob);
     $this->setFieldMetadata();
 
     $this->_newMemberships = [];