Closed (fixed)
Project:
Acquia DAM
Version:
1.1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
21 Aug 2026 at 06:38 UTC
Updated:
10 Sep 2026 at 04:55 UTC
Jump to comment: Most recent
As a developer, I want a queue worker that performs the per-item migration — upload to DAM, change the bundle, populate the DAM fields — resolving dynamic metadata through a mapper, so that each media entity is migrated atomically and safely via cron or Drush with metadata intact.
MigrationMetadataMapper, service acquia_dam_migration_tools.metadata_mapper):getValue() + getMainPropertyName() (single- and multi-value → string arrays), casts to string, drops empty/NULL values, and returns the fields structuregetMetadataFields(EntityInterface $media, string $media_type_id); ALT_TEXT_FIELD special-cases the alt-text mapping (getAltTextValues() reading the source field's alt); no static container accessMediaMigrationQueueWorker):QueueWorkerBase, ID acquia_dam_media_migration, cron = {"time" = 60}, implements ContainerFactoryPluginInterfaceprocessItem() — validates payload (media_id, media_type_id); loads media; skips with a log when already migrated (DB check on the asset-id table); loads source file via source_field_name; collects alt/title for field_media_imageAcquiaDamUploadService::uploadToDam() (W1) passing ['fields' => $this->metadataMapper->getMetadataFields($media, $media_type_id)] alongside filename/profile/description; throws on missing file/URI or failed uploadchangeMediaBundle() (transactional DB update of media + media_field_data), reload, set acquia_dam_asset_id (asset_id/version_id/external_id), set target managed field (display = 1 when sync; alt/title for acquia_dam_managed_image), saveupdateSuccessCount / updateFailureCount) written under a lock (LockBackendInterface)AcquiaDamUploadService, EntityTypeManager, State, LoggerChannelInterface, FileSystem, LockBackendInterface, MigrationMetadataMapper, database, MigrationQueueService, AcquiaDamMigrationUtilityService.services.yml ← updated — metadata_mapper service registration + worker constructor wiringmedia_id; missing media_type_id; media not found; file not found; skips already-migrated; success (bundle change + asset id + progress); upload fails and re-throws; progress counters increment (upload service mocked)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 #4
rajeshreeputraMR merged!