Problem/Motivation

When using the node migration from D6 -> D8 the revision_timestamp field is not populated with source values but is instead filled with the time of the migration.

Proposed resolution

The information of when the last revision was created is readily available in the source database in node_revisions.timestamp. Migrate that into the revision_timestamp field.

Remaining tasks

User interface changes

API changes

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tstoeckler’s picture

Status: Active » Needs review
FileSize
1.44 KB

This seems to work. Will need tests and stuff, but would like some feedback first.

Status: Needs review » Needs work

The last submitted patch, 1: 2333357-1-migrate-revision-timestamp.patch, failed testing.

benjy’s picture

Status: Needs work » Needs review
FileSize
3.89 KB

I added the timestamp to the unit tests and then uncommented the test which was already there for the revision timestamp

tstoeckler’s picture

Awesome, thanks a lot!

penyaskito’s picture

Status: Needs review » Reviewed & tested by the community
  1. +++ b/core/modules/migrate_drupal/src/Plugin/migrate/source/d6/Node.php
    @@ -51,6 +51,9 @@ public function query() {
    +        // The 'timestamp' column will be migrated into the 'revision_timestamp'
    +        // field.
    

    That comment is really a detail from the migration, not the source itself. Why if I want to migrate it somewhere else, or discard it?

    Not stopping this to be committed btw.

  2. +++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateNodeTest.php
    @@ -45,7 +45,7 @@ public function testNode() {
    +    $this->assertEqual($node->getRevisionCreationTime(), 1390095701, 'Node has the correct revision timestamp.');
    

    Is not in the patch, but I checked that this timestamp is used in the dumped data for the test.

tstoeckler’s picture

FileSize
605 bytes
3.8 KB

You are very correct! :-) Thanks!

Leaving at RTBC.

penyaskito’s picture

+1

  • alexpott committed e0d3aca on 8.0.x
    Issue #2333357 by tstoeckler, benjy: Fixed Migrate node_revisions....

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 6: 2333357-6-migrate-revision-timestamp.patch, failed testing.

tstoeckler’s picture

Status: Needs work » Fixed

Status: Fixed » Closed (fixed)

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