diff --git a/CHANGELOG.md b/CHANGELOG.md index ef9ab9f038e7c185a8a7de9f633f3c50187d4e7e..3b54817047c6970d9415f1e4eebe1e16ff0be236 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,6 @@ -# Version 1.29 (not yet released) +# Version 1.29 + +* Fixed issue when same field existed twice but with different names. # Version 1.28 diff --git a/Civi/DataProcessor/Source/AbstractCivicrmEntitySource.php b/Civi/DataProcessor/Source/AbstractCivicrmEntitySource.php index af14b3865eb97e7f95feb421351639e717c9ae04..5802d685b3f9790554c005a4ffc0ed2c1e9374a8 100644 --- a/Civi/DataProcessor/Source/AbstractCivicrmEntitySource.php +++ b/Civi/DataProcessor/Source/AbstractCivicrmEntitySource.php @@ -502,8 +502,9 @@ abstract class AbstractCivicrmEntitySource extends AbstractSource { } if ($originalFieldSpecification && $originalFieldSpecification instanceof CustomFieldSpecification) { $dataFlow = $this->ensureCustomGroup($originalFieldSpecification->customGroupTableName, $originalFieldSpecification->customGroupName); - if (!$dataFlow->getDataSpecification()->doesFieldExist($fieldSpecification->alias)) { + if (!$dataFlow->getDataSpecification()->doesAliasExists($fieldSpecification->alias)) { $dataFlow->getDataSpecification()->addFieldSpecification($fieldSpecification->alias, $fieldSpecification); + } else { } } elseif ($originalFieldSpecification) { $this->ensureEntity(); diff --git a/Civi/DataProcessor/Source/Event/EventSource.php b/Civi/DataProcessor/Source/Event/EventSource.php index be0126cde8a74085f865849b6245fe065dcf385d..8383f82636b74d0c6ae19dab02a198e278cd5a93 100644 --- a/Civi/DataProcessor/Source/Event/EventSource.php +++ b/Civi/DataProcessor/Source/Event/EventSource.php @@ -176,8 +176,9 @@ class EventSource extends AbstractCivicrmEntitySource implements AlterExportInte if (stripos($fieldSpecification->alias, $this->getSourceName().'_locblock_') === 0) { $this->ensureEntity(); $this->locBlockDataFlow->getDataSpecification()->addFieldSpecification($fieldSpecification); + return $this; } else { - parent::ensureFieldInSource($fieldSpecification); + return parent::ensureFieldInSource($fieldSpecification); } } diff --git a/info.xml b/info.xml index 78b639bfb324d3051a4017ec522c52f1faf96daa..8206ee526d024d14f67d846245dc97c70b5839e6 100644 --- a/info.xml +++ b/info.xml @@ -14,8 +14,8 @@ <url desc="Documentation">https://lab.civicrm.org/extensions/dataprocessor/blob/master/README.md</url> <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url> </urls> - <releaseDate>2021-01-12</releaseDate> - <version>1.29-dev</version> + <releaseDate>2021-01-15</releaseDate> + <version>1.29</version> <develStage>stable</develStage> <compatibility> <ver>4.7</ver>