Problem/Motivation
As shown in #2699895: Add settings to define #date_increment for datetime and datetime_range 'default' widgets, the Drupal 7 date module allowed the site builder to configure which granularity to collect:
For example, on my personal site, I have a project
NodeType
which has a "time range" date
field that only cares about year + month granularity. Example: https://wimleers.com/work/project/cdn-far-future-expiration-drupal-7 and https://wimleers.com/work/project/ledgrid.
There are some values like 2008-00-00T00:00
and 2006-10-00T00:00
in the D7 datatabase, which cause a hard failure during migration:
Proposed resolution
Make \Drupal\migrate\Plugin\migrate\process\FormatDate::transform()
detect -00-00T
and -00T
ISO8601 timestamps and transform to valid values.
This then results in the following DB tables in D8:
Remaining tasks
TBD
User interface changes
N/A
API changes
N/A
Data model changes
N/A
Release notes snippet
TBD
Comment | File | Size | Author |
---|---|---|---|
#11 | 3095195-6.patch | 2 KB | heddn |
Comments
Comment #2
Wim LeersComment #3
Wim LeersComment #4
Wim LeersBeen told that I should put this in
migration system
:)Comment #5
heddnNW because needs tests.
Comment #6
jofitz CreditAttribution: jofitz at jofitz commentedAdded tests.
Comment #8
heddnTests added. Thanks for picking that up @jofitz.
Comment #9
Wim LeersMany thanks, @jofitz! ❤️
Comment #11
heddnUploading a new copy of #6 so we don't have the testbot keep running the test only patch.
Comment #14
webchickCommitted and pushed to 9.0.x; 8.9.x; 8.8.x. Thanks!
Comment #16
webchick