Skip to content

Commit

Permalink
Merge pull request #708 from akeneo/release/104.3.14
Browse files Browse the repository at this point in the history
104.3.14
  • Loading branch information
magentix authored Sep 25, 2024
2 parents b46c77c + bcaf334 commit 1c3361c
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 6 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
11 changes: 6 additions & 5 deletions Executor/JobExecutor.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand All @@ -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);
}

Expand Down Expand Up @@ -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) {
Expand All @@ -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);
Expand Down
1 change: 1 addition & 0 deletions Helper/Store.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
);

Expand Down
2 changes: 2 additions & 0 deletions Job/Option.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 1c3361c

Please sign in to comment.