rickydev90 → created an issue.
Rerolling patch from #14 for 2.x Beta6
Previous patches do not work as this module needs to delete the source terms, and dispatch the event at the end of/ after the batch has finished.
Currently in the MR for https://www.drupal.org/project/term_reference_change/issues/3142776 🐛 Use Batch API to avoid timeouts when updating large number of references Needs work the function batchMigrateReference creates the batch job - i've added a patch for this MR in https://www.drupal.org/project/term_reference_change/issues/3142776#comm... 🐛 Use Batch API to avoid timeouts when updating large number of references Needs work which instead returns the batch operations.
In combination with this patch, the term merge worked using batch API, haven't gone through and updated/run the module tests (doesn't look like anyone has with Drupal 10).
In agreement with the statement in #27, batch_set needs to be done outside of the batchMigrateReference function.
I've created a patch that can be applied on top of MR 7 (apologies, not familiar with MR process). It changes batchMigrateReference to getMigrateReferenceBatchOperations which returns an array of operations to use in a batch_set call outside of this module.