Do not always update when used with track_changes: true

Created on 27 January 2023, over 1 year ago
Updated 5 February 2024, 5 months ago

Problem/Motivation

When used with track_changes: true in the migration, the already imported items will always be updated even they didn't change.

Steps to reproduce

- Create a migration with track_changes: true an a migrate_source_queue source
- Create items in the source queue
- Run the migration: drush migrate:import my_migration => the items are created
- Add again items in the source queue, with the same data
- Run the migration again: drush migrate:import my_migration => the items are updated but they shouldn't since they didn't change

Proposed resolution

I have no idea so far. track_changes: true seems to use the whole queue item data, which includes data which is unchanged, but also item_id and created which change each time. Those last 2 are used in the computation of the hash, so since they change, it's considered as a change even if data did not change.

I quicky tried to remove them from the data passed to migrate but I was stuck with the fact that migrate needs the item_id to remove it from the queue.

Remaining tasks

- Find out if it's possible
- Code it

User interface changes

N/A

API changes

N/A

Data model changes

N/A

✨ Feature request
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡«πŸ‡·France GuillaumeDuveau Toulouse

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.69.0 2024