fixed migrations : missing entries, date-range
This commit is contained in:
+2
-1
@@ -64,7 +64,8 @@ process:
|
||||
3: 1
|
||||
4: 1
|
||||
|
||||
field_date: field_date
|
||||
field_date/value: date
|
||||
field_date/end_value: date
|
||||
|
||||
destination:
|
||||
plugin: entity:node
|
||||
|
||||
@@ -113,12 +113,18 @@ class D6EdlpEvenements extends D6Node {
|
||||
}
|
||||
$row_nid = $row->getSourceProperty('nid');
|
||||
|
||||
|
||||
// Make sure we always have a translation set.
|
||||
if ($row->getSourceProperty('tnid') == 0) {
|
||||
$row->setSourceProperty('tnid', $row_nid);
|
||||
}
|
||||
|
||||
// date
|
||||
$date_field = $row->getSourceProperty('field_date');
|
||||
$date_value = $date_field[0]['value'];
|
||||
drush_print($date_value);
|
||||
|
||||
$row->setSourceProperty('date', $date_value);
|
||||
|
||||
// get the workflow status
|
||||
$query = $this->select('workflow_node', 'wn');
|
||||
$query->fields('wn', ['sid']);
|
||||
|
||||
+9
-1
@@ -78,15 +78,23 @@ class D6EdlpTaxonomyTermEntree extends DrupalSqlBase {
|
||||
$description = $query->execute()
|
||||
->fetchField();
|
||||
// drush_print_r($node);
|
||||
// empty enties to keep migrate
|
||||
$empty_entries = array(267, 291, 309, 310);
|
||||
|
||||
if($description == "" && in_array($row->getSourceProperty('tid'), $empty_entries)){
|
||||
$description = "a remplir";
|
||||
}
|
||||
|
||||
$row->setSourceProperty('description', $description);
|
||||
|
||||
// TODO : get the node type page:notice from source and add it to notice field
|
||||
// get the node type page:notice from source and add it to notice field
|
||||
// find node attached to this term for description
|
||||
// get all notice
|
||||
$query = $this->select('term_node', 'tn');
|
||||
$query->condition('tn.tid', 8 ); // page type notice tid
|
||||
$query->addField('tn', 'nid');
|
||||
$notices_nids = $query->execute()->fetchCol();
|
||||
|
||||
// get all nodes taged with the current entree
|
||||
$query = $this->select('term_node', 'tn');
|
||||
$query->condition('tn.tid', $row->getSourceProperty('tid'));
|
||||
|
||||
Reference in New Issue
Block a user