The revision log entries for nodes are hardcoded on insert.

$node->log = 'Created by FeedsNodeProcessor';

and update:

    if ($this->config['update_existing'] == FEEDS_UPDATE_EXISTING) {
      $node->log = 'Updated by FeedsNodeProcessor';
    }
    else {
      $node->log = 'Replaced by FeedsNodeProcessor';
    }

Adding a target to the FeedsNodeProcessor plugin allows one to map to the node's log entry:

    $targets['log'] = array(
      'name' => t('Log'),
      'description' => t('The revision log entry for this insert or update.'),
    );
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

stupiddingo created an issue. See original summary.

stupiddingo’s picture

Status: Active » Needs review
FileSize
653 bytes
MegaChriz’s picture

Issue tags: +Needs tests

Oops. I had missed this one. The new target should have an automated test, which could be added to the existing node processor test class.

@stupiddingo
Do you like to write a test for this target? The test should cover two cases: ensure a revision log entry is set when creating a node and when updating a node. If you are not familiar with writing tests, would you like to get help with that?