We need an automated method to migrate from Addressfield to Address.
| Comment | File | Size | Author |
|---|---|---|---|
| #22 | 2724933-22.patch | 6.36 KB | heddn |
We need an automated method to migrate from Addressfield to Address.
| Comment | File | Size | Author |
|---|---|---|---|
| #22 | 2724933-22.patch | 6.36 KB | heddn |
Comments
Comment #2
ajitsI am working on it in the New Orleans sprint.
Comment #3
bojanz commentedThis needs to be a MigrateCckField plugin. There are examples in core.
Comment #4
hass commentedI'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.
Comment #5
hass commentedComment #6
mglamanhass, do not close as duplicate without linking to which it duplicates.
Comment #7
bojanz commentedIt 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.
Comment #8
hass commentedComment #9
bojanz commentedThe address issue has landed, there are now "addressfield" cckfield and process plugins.
We now need to start using them on this side.
Comment #10
mglamanFor Drupal 7 this will just work. In Ubercart 6 we're mapping multiple fields. Since Address now has it, we can close this.
Comment #12
andyg5000Here's a patch for the d7_billing_profile
Comment #13
heddnCan we see a test added to ProfileBillingTest?
Comment #14
wizonesolutions@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.
Comment #15
heddnIn 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.
Comment #16
heddnThis 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.
Comment #17
heddnSo, 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.
Comment #18
quietone commentedAdded test, the data was already in the table
Comment #19
quietone commentedMoving to commerce component because the fix here is about the commerce address field.
Comment #20
heddnComment #21
heddnComment #22
heddnComment #24
heddnThis looks good now.
Comment #25
heddnComment #26
hass commentedJust one question. If i use addressfield withour commerce, the migration will also work?
Comment #27
heddnYes. 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