Problem/Motivation
As shown in #2699895: Allow configurable date attributes to collect, 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.
When migrating this to Drupal 8, \Drupal\datetime\Plugin\migrate\field\DateField::defineValueProcessPipeline()
chokes on this. This causes big warnings even before migrating/upgrading, i.e. upon going from /upgrade
to /upgrade/review
.
Furthermore, it seems that the migration expects those granularities to be keys, but on my site they're values? 🤷♂️
Proposed resolution
Make \Drupal\datetime\Plugin\migrate\field\DateField::defineValueProcessPipeline()
more robust.
Remaining tasks
TBD
User interface changes
N/A
API changes
N/A
Data model changes
N/A
Release notes snippet
TBD