Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
94ed0af
add logic to patch assets in more messages
lukmzig Nov 26, 2025
e728717
Apply php-cs-fixer changes
lukmzig Nov 26, 2025
e384944
update refresh handler
lukmzig Nov 26, 2025
e8f736c
optimize export processing
lukmzig Nov 27, 2025
fbd8305
Apply php-cs-fixer changes
lukmzig Nov 27, 2025
6cfcff1
code style
lukmzig Nov 27, 2025
02cf29c
update descriptions for endpoints
lukmzig Nov 28, 2025
d289720
update export performance
lukmzig Nov 28, 2025
b5bf8fa
Apply php-cs-fixer changes
lukmzig Nov 28, 2025
4cb77fa
add a permission check
lukmzig Dec 1, 2025
bec8fe3
code style
lukmzig Dec 1, 2025
3e11f53
Reduced the amount of persisting/getting the job since every call res…
mcop1 Dec 1, 2025
4a9562e
Merge remote-tracking branch 'origin/1539-execution-engine-batch-edit…
mcop1 Dec 1, 2025
43de8aa
Apply php-cs-fixer changes
mcop1 Dec 1, 2025
e1b4326
Merge branch '1.x' into 1539-execution-engine-batch-edit-all-assets-f…
martineiber Dec 4, 2025
a9eaddc
Merge branch '1.x' into 1539-execution-engine-batch-edit-all-assets-f…
lukmzig Mar 16, 2026
73c0ed9
fix missing handler dependency
lukmzig Mar 16, 2026
1d26026
fix merge issue
lukmzig Mar 16, 2026
a891c15
Merge branch '1.x' into 1539-execution-engine-batch-edit-all-assets-f…
lukmzig Mar 23, 2026
873a871
combine refresh into first step
lukmzig Mar 23, 2026
5a2f30f
Allow null type in folder export configuration
markus-moser Mar 23, 2026
e232c87
update frequency rate
lukmzig Mar 24, 2026
8e5e6c1
add separate listener and job name for folder export data collection
lukmzig Mar 24, 2026
cc2c777
fix sonar
lukmzig Mar 24, 2026
5d8a762
Merge branch '1.x' into 1539-execution-engine-batch-edit-all-assets-f…
lukmzig Mar 31, 2026
d109930
Merge remote-tracking branch 'origin/2025.4' into 1539-execution-engi…
martineiber Apr 21, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion config/assets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ services:
Pimcore\Bundle\StudioBackendBundle\Asset\ExecutionEngine\AutomationAction\Messenger\Handler\AssetCloneHandler: ~
Pimcore\Bundle\StudioBackendBundle\Asset\ExecutionEngine\AutomationAction\Messenger\Handler\AssetUploadHandler: ~
Pimcore\Bundle\StudioBackendBundle\Asset\ExecutionEngine\AutomationAction\Messenger\Handler\ExportDataCollectionHandler: ~
Pimcore\Bundle\StudioBackendBundle\Asset\ExecutionEngine\AutomationAction\Messenger\Handler\ExportFolderDataCollectionHandler: ~
Pimcore\Bundle\StudioBackendBundle\Asset\ExecutionEngine\AutomationAction\Messenger\Handler\ZipDownloadHandler: ~
Pimcore\Bundle\StudioBackendBundle\Asset\ExecutionEngine\AutomationAction\Messenger\Handler\ZipUploadHandler: ~

Expand Down
1 change: 0 additions & 1 deletion config/data_objects.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,6 @@ services:

Pimcore\Bundle\StudioBackendBundle\DataObject\ExecutionEngine\AutomationAction\Messenger\Handler\CloneHandler: ~
Pimcore\Bundle\StudioBackendBundle\DataObject\ExecutionEngine\AutomationAction\Messenger\Handler\ExportDataCollectionHandler: ~
Pimcore\Bundle\StudioBackendBundle\DataObject\ExecutionEngine\AutomationAction\Messenger\Handler\ExportFolderDataCollectionHandler: ~

#
# Event Subscriber
Expand Down
1 change: 1 addition & 0 deletions config/elements.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ services:
Pimcore\Bundle\StudioBackendBundle\Element\ExecutionEngine\AutomationAction\Messenger\Handler\PatchHandler: ~
Pimcore\Bundle\StudioBackendBundle\Element\ExecutionEngine\AutomationAction\Messenger\Handler\PatchFolderHandler: ~
Pimcore\Bundle\StudioBackendBundle\Element\ExecutionEngine\AutomationAction\Messenger\Handler\ElementUsageReplaceHandler: ~
Pimcore\Bundle\StudioBackendBundle\Element\ExecutionEngine\AutomationAction\Messenger\Handler\RefreshJobHandler: ~

#
# Event Subscriber
Expand Down
6 changes: 5 additions & 1 deletion config/export.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ services:
arguments:
$xlsxExportService: '@Pimcore\Bundle\StudioBackendBundle\Export\Service\XlsxExportService'

Pimcore\Bundle\StudioBackendBundle\Export\ExecutionEngine\AutomationAction\Messenger\Handler\FolderCollectionHandler: ~

#
# Services
#
Expand All @@ -46,4 +48,6 @@ services:

Pimcore\Bundle\StudioBackendBundle\Export\EventSubscriber\XlsxCreationSubscriber:
arguments:
$xlsxExportService: '@Pimcore\Bundle\StudioBackendBundle\Export\Service\XlsxExportService'
$xlsxExportService: '@Pimcore\Bundle\StudioBackendBundle\Export\Service\XlsxExportService'

Pimcore\Bundle\StudioBackendBundle\Export\EventSubscriber\FolderCollectionSubscriber: ~
4 changes: 2 additions & 2 deletions config/pimcore/execution_engine.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,21 @@ framework:
Pimcore\Bundle\StudioBackendBundle\Asset\ExecutionEngine\AutomationAction\Messenger\Messages\AssetCloneMessage: pimcore_generic_execution_engine
Pimcore\Bundle\StudioBackendBundle\Asset\ExecutionEngine\AutomationAction\Messenger\Messages\AssetUploadMessage: pimcore_generic_execution_engine
Pimcore\Bundle\StudioBackendBundle\Asset\ExecutionEngine\AutomationAction\Messenger\Messages\ExportDataCollectionMessage: pimcore_generic_execution_engine
Pimcore\Bundle\StudioBackendBundle\Asset\ExecutionEngine\AutomationAction\Messenger\Messages\ExportFolderDataCollectionMessage: pimcore_generic_execution_engine
Pimcore\Bundle\StudioBackendBundle\Asset\ExecutionEngine\AutomationAction\Messenger\Messages\ZipDownloadMessage: pimcore_generic_execution_engine
Pimcore\Bundle\StudioBackendBundle\Asset\ExecutionEngine\AutomationAction\Messenger\Messages\ZipUploadMessage: pimcore_generic_execution_engine
Pimcore\Bundle\StudioBackendBundle\DataObject\ExecutionEngine\AutomationAction\Messenger\Messages\CloneMessage: pimcore_generic_execution_engine
Pimcore\Bundle\StudioBackendBundle\DataObject\ExecutionEngine\AutomationAction\Messenger\Messages\ExportDataCollectionMessage: pimcore_generic_execution_engine
Pimcore\Bundle\StudioBackendBundle\DataObject\ExecutionEngine\AutomationAction\Messenger\Messages\ExportFolderDataCollectionMessage: pimcore_generic_execution_engine
Pimcore\Bundle\StudioBackendBundle\Document\ExecutionEngine\AutomationAction\Messenger\Messages\CloneMessage: pimcore_generic_execution_engine
Pimcore\Bundle\StudioBackendBundle\Element\ExecutionEngine\AutomationAction\Messenger\Messages\BatchDeleteMessage: pimcore_generic_execution_engine
Pimcore\Bundle\StudioBackendBundle\Element\ExecutionEngine\AutomationAction\Messenger\Messages\ElementDeleteMessage: pimcore_generic_execution_engine
Pimcore\Bundle\StudioBackendBundle\Element\ExecutionEngine\AutomationAction\Messenger\Messages\PatchFolderMessage: pimcore_generic_execution_engine
Pimcore\Bundle\StudioBackendBundle\Element\ExecutionEngine\AutomationAction\Messenger\Messages\PatchMessage: pimcore_generic_execution_engine
Pimcore\Bundle\StudioBackendBundle\Element\ExecutionEngine\AutomationAction\Messenger\Messages\RefreshJobMessage: pimcore_generic_execution_engine
Pimcore\Bundle\StudioBackendBundle\Element\ExecutionEngine\AutomationAction\Messenger\Messages\RecycleBinMessage: pimcore_generic_execution_engine
Pimcore\Bundle\StudioBackendBundle\Element\ExecutionEngine\AutomationAction\Messenger\Messages\RewriteRefMessage: pimcore_generic_execution_engine
Pimcore\Bundle\StudioBackendBundle\Export\ExecutionEngine\AutomationAction\Messenger\Messages\CsvCreationMessage: pimcore_generic_execution_engine
Pimcore\Bundle\StudioBackendBundle\Export\ExecutionEngine\AutomationAction\Messenger\Messages\XlsxCreationMessage: pimcore_generic_execution_engine
Pimcore\Bundle\StudioBackendBundle\Export\ExecutionEngine\AutomationAction\Messenger\Messages\FolderCollectionMessage: pimcore_generic_execution_engine
Pimcore\Bundle\StudioBackendBundle\Tag\ExecutionEngine\AutomationAction\Messenger\Messages\BatchTagOperationMessage: pimcore_generic_execution_engine
Pimcore\Bundle\StudioBackendBundle\RecycleBin\ExecutionEngine\Messages\DeleteItemsMessage: pimcore_generic_execution_engine
Pimcore\Bundle\StudioBackendBundle\RecycleBin\ExecutionEngine\Messages\RestoreItemsMessage: pimcore_generic_execution_engine
Expand Down
25 changes: 7 additions & 18 deletions src/Asset/Attribute/Request/PatchAssetFolderRequestBody.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
namespace Pimcore\Bundle\StudioBackendBundle\Asset\Attribute\Request;

use Attribute;
use OpenApi\Attributes\Items;
use OpenApi\Attributes\JsonContent;
use OpenApi\Attributes\Property;
use OpenApi\Attributes\RequestBody;
Expand All @@ -39,23 +38,13 @@ public function __construct()
properties: [
new Property(
property: 'data',
type: 'array',
items: new Items(
required: ['folderId'],
properties: [
new Property(
property: 'folderId',
description: 'Folder ID',
type: 'integer',
example: 83
),
new UpdateIntegerProperty('parentId'),
new UpdateStringProperty('key'),
new UpdateStringProperty('locked'),
new CustomMetadata(PatchCustomMetadata::class),
],
type: 'object',
),
properties: [
new UpdateIntegerProperty('parentId'),
new UpdateStringProperty('key'),
new UpdateStringProperty('locked'),
new CustomMetadata(PatchCustomMetadata::class),
],
type: 'object',
),
new Property(
property: 'filters',
Expand Down
16 changes: 11 additions & 5 deletions src/Asset/Controller/PatchFolderController.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
use Pimcore\Bundle\StudioBackendBundle\Controller\AbstractApiController;
use Pimcore\Bundle\StudioBackendBundle\Exception\Api\UserNotFoundException;
use Pimcore\Bundle\StudioBackendBundle\MappedParameter\PatchFolderParameter;
use Pimcore\Bundle\StudioBackendBundle\OpenApi\Attribute\Parameter\Path\IdParameter;
use Pimcore\Bundle\StudioBackendBundle\OpenApi\Attribute\Response\Content\IdJson;
use Pimcore\Bundle\StudioBackendBundle\OpenApi\Attribute\Response\CreatedResponse;
use Pimcore\Bundle\StudioBackendBundle\OpenApi\Attribute\Response\DefaultResponses;
Expand All @@ -38,6 +39,8 @@
*/
final class PatchFolderController extends AbstractApiController
{
private const string ROUTE = '/assets/folder/{id}';

public function __construct(
SerializerInterface $serializer,
private readonly PatchServiceInterface $patchService,
Expand All @@ -49,15 +52,16 @@ public function __construct(
/**
* @throws UserNotFoundException
*/
#[Route('/assets/folder', name: 'pimcore_studio_api_patch_asset_folder', methods: ['PATCH'])]
#[Route(self::ROUTE, name: 'pimcore_studio_api_patch_asset_folder', methods: ['PATCH'])]
#[IsGranted(UserPermissions::ASSETS->value)]
#[Patch(
path: self::PREFIX . '/assets/folder',
path: self::PREFIX . self::ROUTE,
operationId: 'asset_patch_folder_by_id',
description: 'asset_patch_folder_by_id_description',
summary: 'asset_patch_folder_by_id_summary',
tags: [Tags::Assets->name]
)]
#[IdParameter(type: ElementTypes::TYPE_FOLDER, name: 'id')]
#[PatchAssetFolderRequestBody]
#[CreatedResponse(
description: 'asset_patch_by_id_created_response',
Expand All @@ -67,10 +71,12 @@ public function __construct(
HttpResponseCodes::NOT_FOUND,
HttpResponseCodes::UNAUTHORIZED,
])]
public function assetPatchFolderById(#[MapRequestPayload] PatchFolderParameter $patchFolderParameter): Response
{

public function assetPatchFolderById(
int $id,
#[MapRequestPayload] PatchFolderParameter $patchFolderParameter
): Response {
$jobRunId = $this->patchService->patchFolder(
$id,
ElementTypes::TYPE_ASSET,
$patchFolderParameter,
$this->securityService->getCurrentUser()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
use Exception;
use Pimcore\Bundle\StaticResolverBundle\Models\User\UserResolverInterface;
use Pimcore\Bundle\StudioBackendBundle\Asset\ExecutionEngine\AutomationAction\Messenger\Messages\ExportDataCollectionMessage;
use Pimcore\Bundle\StudioBackendBundle\Asset\Service\AssetServiceInterface;
use Pimcore\Bundle\StudioBackendBundle\ExecutionEngine\AutomationAction\AbstractHandler;
use Pimcore\Bundle\StudioBackendBundle\ExecutionEngine\Util\Config;
use Pimcore\Bundle\StudioBackendBundle\ExecutionEngine\Util\StepConfig;
Expand All @@ -28,6 +27,7 @@
use Pimcore\Bundle\StudioBackendBundle\Mercure\Service\UserTopicServiceInterface;
use Pimcore\Bundle\StudioBackendBundle\Util\Constant\ElementTypes;
use Symfony\Component\Messenger\Attribute\AsMessageHandler;
use function count;

/**
* @internal
Expand All @@ -44,7 +44,6 @@ public function __construct(
private readonly UserResolverInterface $userResolver,
private readonly UserTopicServiceInterface $userTopicService,
private readonly GridServiceInterface $gridService,
private readonly AssetServiceInterface $assetService
) {
parent::__construct();
}
Expand All @@ -70,70 +69,62 @@ public function __invoke(ExportDataCollectionMessage $message): void
));
}

$jobAsset = $this->extractConfigFieldFromJobStepConfig($message, StepConfig::ELEMENT_TO_EXPORT->value);

$asset = $this->assetService->getAssetForUser($jobAsset['id'], $user);

if ($asset->getType() === ElementTypes::TYPE_FOLDER) {
$this->abort($this->getAbortData(
Config::ELEMENT_FOLDER_COLLECTION_NOT_SUPPORTED->value,
[
'folderId' => $asset->getId(),
]
));

return;
}

$assets = $this->extractConfigFieldFromJobStepConfig($message, StepConfig::ELEMENTS_TO_EXPORT->value);
$totalAssets = count($assets);
$columns = $this->extractConfigFieldFromJobStepConfig($message, StepConfig::CONFIG_COLUMNS->value);

$columnsDefinitions = $this->columnConfigurationService->getAvailableAssetColumnConfiguration();

$columnCollection = $this->gridService->getConfigurationForExport(
$columns,
$columnsDefinitions
);
$columnCollection = $this->gridService->getConfigurationForExport($columns, $columnsDefinitions);

try {
$assetData = [
$asset->getId() => $this->gridService->getGridValuesForElement(
$assetsData = [];
foreach ($assets as $asset) {
try {
$assetsData[$asset['id']] = $this->gridService->getGridValuesForElement(
$columnCollection,
ElementTypes::TYPE_ASSET,
$asset->getId(),
true,
$asset['id'],
$user
),
];

$this->updateContextArrayValues($jobRun, StepConfig::GRID_EXPORT_DATA->value, $assetData);

$csvExportDataInfo = $jobRun->getContext()[StepConfig::GRID_EXPORT_DATA_INFO->value] ?? null;
);

if ($csvExportDataInfo === null) {
$this->updateContextArrayValues(
$jobRun,
StepConfig::GRID_EXPORT_DATA_INFO->value,
} catch (Exception $e) {
$this->abort($this->getAbortData(
Config::CSV_DATA_COLLECTION_FAILED_MESSAGE->value,
[
'type' => ElementTypes::TYPE_ASSET,
'id' => $asset['id'],
'message' => $e->getMessage(),
]
);
));
}

$this->updateProgress(
$this->publishService,
$this->userTopicService,
$jobRun,
$this->getJobStep($message)->getName(),
$totalAssets,
$totalAssets
);
}

try {
if (!empty($assetsData)) {
$context = $jobRun->getContext();
if (isset($context[StepConfig::GRID_EXPORT_DATA->value])) {
$assetsData = array_merge(
$context[StepConfig::GRID_EXPORT_DATA->value],
$assetsData
);
}
$this->updateJobRunContext($jobRun, StepConfig::GRID_EXPORT_DATA->value, $assetsData);
}
} catch (Exception $e) {
$this->abort($this->getAbortData(
Config::CSV_DATA_COLLECTION_FAILED_MESSAGE->value,
[
'id' => $asset->getId(),
'message' => $e->getMessage(),
]
));
}

$this->updateProgress(
$this->publishService,
$this->userTopicService,
$jobRun,
$this->getJobStep($message)->getName()
);
}
}
Loading
Loading