Browse Source

ajoute l’import du status

master
vincent 4 months ago
parent
commit
08877a6fa6
1 changed files with 9 additions and 1 deletions
  1. +9
    -1
      src/Controller/ProjectController.php

+ 9
- 1
src/Controller/ProjectController.php View File

@ -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();


Loading…
Cancel
Save