Commit a22c5d30 authored by xjm's avatar xjm

Revert "Issue #2894068 by Jo Fitzgerald, davidsickmiller, Yogesh Pawar, heddn,...

Revert "Issue #2894068 by Jo Fitzgerald, davidsickmiller, Yogesh Pawar, heddn, quietone: datetime_type is not set correctly when migrating datetime fields from D7"

This reverts commit a151cef1.
parent ee0f8068
......@@ -26,16 +26,6 @@ public function transform($value, MigrateExecutableInterface $migrate_executable
}
break;
case 'date':
case 'datetime':
case 'datestamp':
if ($value['granularity']['hour'] === 0
&& $value['granularity']['minute'] === 0
&& $value['granularity']['second'] === 0) {
$value['datetime_type'] = 'date';
}
break;
case 'taxonomy_term_reference':
$value['target_type'] = 'taxonomy_term';
break;
......
......@@ -101,8 +101,6 @@ public function testFields() {
$this->assertEntity('node.field_node_entityreference', 'entity_reference', TRUE, -1);
$this->assertEntity('node.field_user_entityreference', 'entity_reference', TRUE, 1);
$this->assertEntity('node.field_term_entityreference', 'entity_reference', TRUE, -1);
$this->assertEntity('node.field_date_without_time', 'datetime', TRUE, 1);
$this->assertEntity('node.field_datetime_without_time', 'datetime', TRUE, 1);
// Assert that the taxonomy term reference fields are referencing the
// correct entity type.
......@@ -119,18 +117,6 @@ public function testFields() {
$this->assertEquals('user', $field->getSetting('target_type'));
$field = FieldStorageConfig::load('node.field_term_entityreference');
$this->assertEquals('taxonomy_term', $field->getSetting('target_type'));
// Make sure that datetime fields get the right datetime_type setting
$field = FieldStorageConfig::load('node.field_date');
$this->assertEquals('datetime', $field->getSetting('datetime_type'));
$field = FieldStorageConfig::load('node.field_date_without_time');
$this->assertEquals('date', $field->getSetting('datetime_type'));
$field = FieldStorageConfig::load('node.field_datetime_without_time');
$this->assertEquals('date', $field->getSetting('datetime_type'));
// Except for field_date_with_end_time which is a timestamp and so does not
// have a datetime_type setting.
$field = FieldStorageConfig::load('node.field_date_with_end_time');
$this->assertNull($field->getSetting('datetime_type'));
}
/**
......
......@@ -52,8 +52,8 @@ protected function getEntityCounts() {
'configurable_language' => 4,
'contact_form' => 3,
'editor' => 2,
'field_config' => 63,
'field_storage_config' => 46,
'field_config' => 61,
'field_storage_config' => 44,
'file' => 3,
'filter_format' => 7,
'image_style' => 6,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment