diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f1640ff..eec538cf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -509,3 +509,8 @@ ### Version 104.3.13 : * Symfony HTTP Client requirement updated + +### Version 104.3.14 : +* PGTO-340: Fix job executor date format +* PGTO-462: Set attribute code to lowercase for options +* Fix non-scopable localizable attribute import diff --git a/Executor/JobExecutor.php b/Executor/JobExecutor.php index d30c2c8c..666cb3e6 100644 --- a/Executor/JobExecutor.php +++ b/Executor/JobExecutor.php @@ -23,6 +23,7 @@ use Magento\Framework\Message\ManagerInterface as MessageManagerInterface; use Magento\Framework\Phrase; use Magento\Framework\Serialize\SerializerInterface; +use Magento\Framework\Stdlib\DateTime; use Symfony\Component\Console\Output\OutputInterface; /** @@ -357,7 +358,7 @@ public function execute(string $code, ?OutputInterface $output = null) $isError = true; } - $this->lastSuccessExecutedDate[$this->getCurrentJobClass()->getFamily()] = date('y-m-d H:i:s'); + $this->lastSuccessExecutedDate[$this->getCurrentJobClass()->getFamily()] = date(DateTime::DATETIME_PHP_FORMAT); // If last family, force proceed with after run steps if (array_slice($productFamiliesToImport, -1)[0] === $family @@ -689,7 +690,7 @@ public function setJobStatus(int $status, $job = null) } if ($status === JobInterface::JOB_SCHEDULED) { - $job->setScheduledAt(date('y-m-d H:i:s')); + $job->setScheduledAt(date(DateTime::DATETIME_PHP_FORMAT)); } $job->setStatus($status); @@ -713,7 +714,7 @@ public function beforeRun() 'akeneo_connector_import_start_' . strtolower($this->currentJob->getCode()), ['executor' => $this] ); - $this->currentJob->setLastExecutedDate(date('y-m-d H:i:s')); + $this->currentJob->setLastExecutedDate(date(DateTime::DATETIME_PHP_FORMAT)); $this->setJobStatus(JobInterface::JOB_PROCESSING); } @@ -747,7 +748,7 @@ public function afterRun($error = null, $onlyStop = null) } if ($this->currentJob->getCode() === JobExecutor::IMPORT_CODE_PRODUCT) { - $this->currentJob->setLastSuccessDate(date('y-m-d H:i:s')); + $this->currentJob->setLastSuccessDate(date(DateTime::DATETIME_PHP_FORMAT)); $this->currentJob->setLastSuccessExecutedDate($this->json->serialize($this->lastSuccessExecutedDate)); if ($this->currentJob->getStatus() === JobInterface::JOB_ERROR) { @@ -757,7 +758,7 @@ public function afterRun($error = null, $onlyStop = null) if ($error === null && $this->currentJob->getStatus() !== JobInterface::JOB_ERROR) { if ($this->currentJob->getCode() !== JobExecutor::IMPORT_CODE_PRODUCT) { - $this->currentJob->setLastSuccessDate(date('y-m-d H:i:s')); + $this->currentJob->setLastSuccessDate(date(DateTime::DATETIME_PHP_FORMAT)); $this->currentJob->setLastSuccessExecutedDate($this->currentJob->getLastExecutedDate()); } $this->setJobStatus(JobInterface::JOB_SUCCESS); diff --git a/Helper/Store.php b/Helper/Store.php index 2ea13c78..de924e93 100644 --- a/Helper/Store.php +++ b/Helper/Store.php @@ -210,6 +210,7 @@ public function getAllStores() $this->getStores(['channel_code']), // channel $this->getStores(['currency']), // USD $this->getStores(['channel_code', 'currency']), // channel-USD + $this->getStores(['lang', 'currency']), // en_US-USD $this->getStores(['lang', 'channel_code', 'currency']) // en_US-channel-USD ); diff --git a/Job/Option.php b/Job/Option.php index f3ba26b7..81a3dada 100644 --- a/Job/Option.php +++ b/Job/Option.php @@ -264,6 +264,8 @@ public function insertData() $this->logImportedEntities($this->logger); } + $connection->update($tmpTable, ['attribute' => new Expr('LOWER(`attribute`)')]); + /* Remove option without an admin store label */ if (!$this->configHelper->getOptionCodeAsAdminLabel()) { /** @var string $localeCode */ diff --git a/composer.json b/composer.json index 630100d4..41173aaf 100644 --- a/composer.json +++ b/composer.json @@ -14,7 +14,7 @@ "nyholm/psr7": "^1.5" }, "type": "magento2-module", - "version": "104.3.13", + "version": "104.3.14", "license": [ "OSL-3.0", "AFL-3.0"