|
|
@ -122,7 +122,15 @@ class ProjectController extends AbstractController |
|
|
|
$task->setDescription($row[$col['description']]); |
|
|
|
$task->setOsm($row[$col['osm']]); |
|
|
|
$task->setGeojson(json_decode($row[$col['geojson']], true)); |
|
|
|
$task->setStatus(Task::STATUS_TODO); |
|
|
|
if (isset($row[$col['status']]) and in_array($row[$col['status']], [ |
|
|
|
Task::STATUS_TODO, |
|
|
|
Task::STATUS_DOING, |
|
|
|
Task::STATUS_DONE, |
|
|
|
])) { |
|
|
|
$task->setStatus($row[$col['status']]); |
|
|
|
} else { |
|
|
|
$task->setStatus(Task::STATUS_TODO); |
|
|
|
} |
|
|
|
$entityManager->persist($task); |
|
|
|
} |
|
|
|
$entityManager->flush(); |
|
|
|