Closed (fixed)
Project:
Acquia DAM
Version:
1.1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
4 Aug 2026 at 07:20 UTC
Updated:
20 Aug 2026 at 12:05 UTC
Jump to comment: Most recent
As a developer, I want a shared AssetMediaImportService in the parent acquia_dam module, so that media entity creation logic is reusable by both acquiadam_asset_import (bulk import) and acquia_dam_webhooks (real-time import) without cross-submodule coupling.
AssetMediaImportService (parent acquia_dam module):acquia_dam.asset_media_importprepareImportItem(array $asset_data, array $bundles = []): ?array — checks released_and_not_expired, checks not already imported (DB query on media__acquia_dam_asset_id), resolves bundle via MediaTypeResolver, returns formatted item ['target_bundle', 'file_name', 'asset_uuid', 'version_id'] or NULLisAlreadyImported(string $asset_id): bool — DB check on media__acquia_dam_asset_idcreateMediaEntity(array $item, int $uid = 0): MediaInterface — create + save new media entityacquiadam_asset_import refactor (minimal):AssetQueueService delegates filterAndFormatAsset() + filterAssetsToImport() to AssetMediaImportService::prepareImportItem()AssetImporter delegates create+save to AssetMediaImportService::createMediaEntity()Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
rajeshreeputraRequesting review.
Comment #5
rajeshreeputraMR merged!