Problem/Motivation
Can't get last_imported timestamps recorded in the map table. Tried using $migration->setTrackLastImported(TRUE) in my source plugin but nothing gets recorded.
Proposed resolution
Fix Drupal\migrate\Plugin\Migration::getTrackLastImported() so it actually returns something. Might as well fix Migration::getDestinationIds() while we're there. :)
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | 2723123-7-complete.patch | 2.03 KB | agoradesign |
| #7 | 2723123-7-tests.patch | 1.44 KB | agoradesign |
Comments
Comment #2
milesw commentedPatch to fix return values.
Comment #3
milesw commentedFYI, this was introduced March 30, 2016 in #2694009: MigrationInterface doesn't include get()
Comment #4
mikeryanOuch - how did that get in? Answer - lack of tests, let's add them.
Comment #5
benjy commentedNW for tests
Comment #6
agoradesign commentedwill write the test cases
Comment #7
agoradesign commentedSo, here are the tests. As I've only added the tests, there's no interdiff necessary
btw, the migrate test structure seems to be a little bit messy, unless there's a clear intention for this:
There are 3 classes with
@coversDefaultClass \Drupal\migrate\Plugin\Migrationannotation:At least the first two kernel tests should be combined into a single class... But that shouldn't be part of this issue now...
Comment #9
benjy commentedThanks, RTBC.
Lets create a follow-up to merge the first two classes. The second one is the process plugin so that's fine.
Comment #10
alexpottCommitted fb1c0f3 and pushed to 8.1.x and 8.2.x. Thanks!