I would like to add getter and setter methods for the $trackLastImported boolean in MigrateMap. This would augment the ability to set it via the constructor, as already implemented in #1703050: Enable setting trackLastImported, which is currently the only way to get at it.

I ran into the case of using migrate_d2d, which happens to handle constructing the MigrateSQLMap object without giving the calling code any way to pass $options['track_last_imported'] to the constructor.

I realize another solution could be patching migrate_d2d to add in that option, but patching Migrate to add a getter and setter seems more flexible -- unless there is some reason why allowing that setting to be changed could be problematic? The only potential issue I could see would be changing that value would lead to creating inconsistent data (i.e. some rows would have the timestamp, and others wouldn't)...but I think that could happen already by changing that option passed into the constructor between running the import multiple times, correct?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tea.time’s picture

Status: Active » Needs review
FileSize
601 bytes

Attaching patch.

  • mikeryan committed dd175fc on 7.x-2.x
    Issue #2353527 by tea.time: Add getter/setter for trackLastImported
    
mikeryan’s picture

Status: Needs review » Fixed
Issue tags: +Migrate 2.6

Committed, thanks!

Status: Fixed » Closed (fixed)

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