Problem/Motivation

The module generates derivatives with a delimiter different from the standard notation used by most Drupal derivatives. Which is __, but the module currently uses _.

This makes it difficult to do migration lookups against base derivatives since the expected mapping ID is different to what was generated by the module.

e.g. a simple derivative ID for the basic_page bundle of the d7_node_complete migration should be migrate_plus.migration.d7_node_complete__page, but it's currently generated as migrate_plus.migration.d7_node_complete_page.

Steps to reproduce

The following migration process should be possible (based off the statistics migration):

process:
  nid:
    -
      plugin: migration_lookup
      migration:
        # It should be possible to lookup all derivatives of this migration. This currently fails with the default configurations.
        - d7_node_complete
      source: nid
    -
      plugin: node_complete_node_lookup
    -
      plugin: skip_on_empty
      method: row

Proposed resolution

Switch the derivative delimiter in \Drupal\migrate_upgrade\MigrateUpgradeDrushRunner::modifyId from _ to __.

Remaining tasks

Provide a patch and MR.

User interface changes

N/A.

API changes

N/A. I believe this should only affect new migrations.

Command icon Show commands

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

codebymikey created an issue. See original summary.

codebymikey’s picture

Attached a copy of the patch from the MR.

codebymikey’s picture

Status: Active » Needs review
heddn’s picture

Version: 8.x-3.x-dev » 4.0.x-dev
Category: Bug report » Task
Status: Needs review » Needs work

I like the idea here. Let's roll this into an MR and see how tests like it.

codebymikey’s picture

Status: Needs work » Needs review

Tests seem to pass with a 4.0.x reroll

heddn’s picture

Status: Needs review » Fixed

Thanks for rerolling this.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

  • heddn committed 4d03b71f on 4.0.x authored by codebymikey
    chore: #3228311 Migration derivatives don't make use of the correct...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.