Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
It would be enormously useful to be able to migrate votingapi values from D6 and D7 sites to D8.
See also #2697163: Add migration support for a D7 version of this issue.
Comment | File | Size | Author |
---|---|---|---|
#5 | interdiff.txt | 756 bytes | marvil07 |
#5 | 2831575-5.patch | 2.98 KB | marvil07 |
Comments
Comment #2
malcomio CreditAttribution: malcomio at Capgemini commentedI'm making a start on this at https://github.com/malcomio/votingapi/tree/migrate, although I'm still trying to get my head around how to write migration plugins
https://www.drupal.org/docs/8/api/migrate-api/migrate-api-overview links to https://groups.drupal.org/node/387488, but it seems to be out of date
Comment #3
marvil07 CreditAttribution: marvil07 at Isovera for Pegasystems commentedI have not used the mentioned github source above as base because it does not specify license, and since it is not in drupal.org, the license cannot be assumed.
Also, that is about d6 migration, so it is really complementary to this.
What is added:
d7_vote
migrate source plugin.d7_node_vote
migrate source plugin, extending the previous one. This is really helpful for importing a subset related to nodes.d7_vote
migration, usingd7_vote
migrate source plugin, to import all votes from d7 to d8.We may want to either add independent commits for d6 and d7, or maybe split this into two tickets.
Comment #4
benjifisherI am starting to look at this. I have not tested yet, but the code looks solid. Just one suggestion:
I would replace the last two lines with something like this:
Comment #5
marvil07 CreditAttribution: marvil07 at Isovera for Pegasystems commented@benjifisher, I guess the idea behind your suggestion is to be less verbose, I tried to do that in this patch.
Comment #6
benjifisherI like that! It is easier to read than the original (or my suggestion) and it keeps these lines under 80 characters.
Comment #7
benjifisherI did some testing of this on my current project. (I am working on this project with @marvil07.) The migration works as expected.
I checked the votes associated to a few nodes (36 votes in all for four nodes): I checked the entity ID and vote value for all of them, and the timestamp and
vote_source
for a couple. In my test, theentity_type
,value_type
, andtag
were all the same.I tested the source plugin from this patch, but we are using a custom migration, not the one provided by the patch.
Comment #9
pifagorComment #10
marvil07 CreditAttribution: marvil07 at Isovera for Pegasystems commented@pifagor: thanks for including the change!
Comment #11
pifagor@marvil07 Thank you for your contribution to the development of the module