Problem/Motivation

When migrating nodes from Drupal 6 to Drupal 7, Statistics fields are mapped, but the node_counter table is not joined on the DrupalNode6Migration::query(). See the following:

Used as source field in mapping but not in source field list:
 daycount
 timestamp
 totalcount

I believe this is also the case when migrating from Drupal 5, but I'm not familiar enough with D5 to even know if the Statistics module is available in D5.

Proposed resolution

In DrupalNode6Migration::query(), implement a check for the node_counter table and join node_counter if it is available.
Something similar may be needed for DrupalNode5Migration.

Remaining tasks

  • Fix for DrupalNode6Migration
  • Fix for DrupalNode5Migration if necessary
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

colinafoley’s picture

Issue summary: View changes
Status: Needs work » Needs review
FileSize
609 bytes

Here's the first pass at DrupalNode6Migration. Just worked for me on the migration I'm writing.

gawrion’s picture

Hey - while ago i've testet that query for D5 and it also works for me. Table node_count is simply the same i think ;)

internets’s picture

Thank you! I was wondering why my view "totalcount" for migrated nodes were 0.

This patch made the statistics properly migrate for a Drupal 6 to Drupal 7 node.

Using the following modules along with a custom migration module.

 Migration                 Drupal-to-Drupal migration (migrate_d2d)                7.x-2.1-beta1+7-dev 
 Migration                 Migrate (migrate)                                       7.x-2.6-rc1+22-dev  
 Migration                 Migrate Extras (migrate_extras)                         7.x-2.5+4-dev       
 Migration                 Migrate UI (migrate_ui)                                 7.x-2.6-rc1+22-dev  
hussainweb’s picture

Status: Needs review » Reviewed & tested by the community

The patch looks good and applies okay. I tested it and it works fine.

mikeryan’s picture

Status: Reviewed & tested by the community » Fixed

Committed (plus support for D5 and D7), thanks!

  • Commit 07c0b4a on 7.x-2.x by mikeryan:
    Issue #2150781 by colinafoley,mikeryan: Pull statistics data when...

Status: Fixed » Closed (fixed)

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