We need an automated method to migrate from Addressfield to Address.

Comments

mglaman created an issue. See original summary.

ajits’s picture

I am working on it in the New Orleans sprint.

bojanz’s picture

This needs to be a MigrateCckField plugin. There are examples in core.

hass’s picture

Title: Addressfield -> Address » Migrate Addressfield -> Address
Project: Commerce Migrate » Address
Version: 8.x-2.x-dev » 8.x-1.x-dev

I'm not using commerce at all, but addressfield and need to migrate the data. This task is not commerce specific. This is a address module task and not any other.

hass’s picture

Status: Active » Closed (duplicate)
mglaman’s picture

Status: Closed (duplicate) » Active

hass, do not close as duplicate without linking to which it duplicates.

bojanz’s picture

Project: Address » Commerce Migrate
Version: 8.x-1.x-dev » 8.x-2.x-dev

It is not uncommon to track the same issue in multiple queues. For Address we already have #2594631: Migration integration. This one belongs in Commerce Migrate.

hass’s picture

bojanz’s picture

The address issue has landed, there are now "addressfield" cckfield and process plugins.
We now need to start using them on this side.

mglaman’s picture

Status: Active » Fixed

For Drupal 7 this will just work. In Ubercart 6 we're mapping multiple fields. Since Address now has it, we can close this.

Status: Fixed » Closed (fixed)

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

andyg5000’s picture

Status: Closed (fixed) » Needs review
StatusFileSize
new522 bytes

Here's a patch for the d7_billing_profile

heddn’s picture

Status: Needs review » Needs work
Issue tags: +Needs tests

Can we see a test added to ProfileBillingTest?

wizonesolutions’s picture

@heddn: Could I have a couple pointers on how to write a test for this, even if just what to look at in order to figure it out? I noticed that addresses in profiles aren't getting migrated from CK1, and this patch seems like it would address that.

heddn’s picture

In https://git.acromedia.com/heddn/commerce_quickbooks_online_ui/blob/refac..., I've added some address data. Then enabled all the right parts of address to test extracting data. Here we want to do the opposite. We want to have data in the source ck2 database dump, then make sure it can get sucked into Commerce. Here's some guidance on how to update the fixture: https://www.drupal.org/docs/8/api/migrate-api/generating-database-fixtur...

Then you want to manually run the migration as part of the test, then see if the expected data made it into the destination.

heddn’s picture

This also might want to move over to the address module instead. Or at least parts move. See #2912087: Field plugin migration from D7/addressfield, which I think is duplicate.

heddn’s picture

So, I did a review of things and we should add some addressfield data into the fixture, if it doesn't already exist. Nothing needs to move here, just need data to test with.

quietone’s picture

Status: Needs work » Needs review
Issue tags: -Needs tests
StatusFileSize
new6.46 KB

Added test, the data was already in the table

quietone’s picture

Component: Code » Drupal Commerce 1.x

Moving to commerce component because the fix here is about the commerce address field.

heddn’s picture

Issue tags: +Needs reroll
heddn’s picture

Status: Needs review » Needs work
heddn’s picture

Status: Needs work » Needs review
Issue tags: -Needs reroll
StatusFileSize
new6.36 KB

  • heddn committed ca5f373 on 8.x-2.x
    Issue #2724933 by heddn, quietone, andyg5000: Migrate Addressfield ->...
heddn’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community

This looks good now.

heddn’s picture

Status: Reviewed & tested by the community » Fixed
hass’s picture

Just one question. If i use addressfield withour commerce, the migration will also work?

heddn’s picture

Yes. This just adds automation for commerce. The field plugin is in address module. There's a Cck version and just today an updated field plugin landed. See #2912087: Field plugin migration from D7/addressfield

Status: Fixed » Closed (fixed)

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