Closed (fixed)
Project:
Acquia DAM
Version:
1.1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
20 Aug 2026 at 14:20 UTC
Updated:
10 Sep 2026 at 04:55 UTC
Jump to comment: Most recent
As a site administrator, I want to open the migration wizard and run the migration in batches, so that large media libraries migrate with progress reporting, dedup, and correct post-processing (field-data copy, view-display fixes, validation).
Acceptance Criteria:
Queue service (MigrationQueueService):
getQueue() — returns the acquia_dam_media_migration queuequeueMediaForMigration() — per-type; skips types not included, types without a target media type, already-migrated media (asset-id table), and already-queued media (dedup table); inserts into acquia_dam_migration_queue_mapgetQueueStatus(), clearQueue(), resetMigrationState(), getManagedFieldName(), getMigratedMediaIds() / isMediaMigrated(), performMediaTypeOperations()@queue, @state, @entity_type.manager, @database, @config.factory, utility serviceacquia_dam_migration_queue_map (media_id PK) replaces the full-queue unserialize scan (memory-safe at 50K+)Batch engine:
Batch/QueueProcessBatch.php — thin static wrapper exposing QueueProcessBatchService to the batch APIQueueProcessBatchService (DI-injected) — process() claims items, delegates to the queue worker plugin, deletes on success / re-queues on failure, tracks progress in the sandbox; failure re-queued with retry_count, dropped with a log after max 3 attemptsfinish() — copyAssetDataFromOldToNewTable(), validateMigrationCompletion(), updateViewDisplays(), sets acquia_dam.migration_process_finishedcopyAssetDataFromOldToNewTable() — dynamic table mapping via SqlContentEntityStorage::getTableMapping(); copies core field data (target_id, alt, title, display, description, width, height) into DAM managed tables, batched (1000/batch), transactionalupdateViewDisplays() — per target bundle: hides unused DAM field, shows correct managed field, applies acquia_dam_embed_code embed formatter (+ embed_style for images)getMediaCounts(), getMediaCountsPostMigration(), validateMigrationCompletion(), populateMigratedDataState() helpersController (MigrationController):
openMigrationForm() — routes to the wizard (AcquiaDamMigration) or the completion page (AcquiaDamMigrationComplete) based on the acquia_dam.migration_process_finished state; title() callback; completePage()State, FormBuilder, RouteMatch, AcquiaDamMigrationUtilityServiceScaffold (structure layer):
acquia_dam_migration_tools.routing.yml ← new — route acquia_dam_migration_tools.configuration (/admin/config/acquia-dam/migration, POST), _controller: MigrationController::openMigrationForm, _title_callback: MigrationController::title, _permission: administer acquia_dam + _custom_access: AuthenticationController::checkAccessacquia_dam_migration_tools.permissions.yml ← new — administer acquia_dam_migration_tools (restrict access)acquia_dam_migration_tools.links.menu.yml ← new (parent: acquia_dam.config) + acquia_dam_migration_tools.links.task.yml ← new (base_route: acquia_dam.config)acquia_dam_migration_tools.services.yml ← updated — queue + batch service registrationsTests:
QueueProcessBatchTest (kernel) — getMediaCounts empty/correct/multi-bundle/bundle-with-no-media; validateMigrationCompletion empty/no-include; getMediaCountsPostMigration empty/empty-bundlesMigrationQueueServiceTest (kernel) — getQueue; queues items; skips not-included types; skips types without target media type; empty stored values; clearQueue; getQueueStatus; resetMigrationStateMigrationControllerTest (kernel) ← new coverage — wizard vs completion-page routing based on migration_process_finishedStart 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
rajeshreeputraComment #4
rajeshreeputraComment #5
rajeshreeputraMerged in #3617773: Config form for migration mapping and summary, closing.
Comment #8
rajeshreeputraComment #10
rajeshreeputraMR merged!