Create TaskDuplication model

This commit is contained in:
Frédéric Guillot
2014-11-23 18:23:20 -05:00
parent f684602ebe
commit 81df22de23
13 changed files with 556 additions and 282 deletions

View File

@@ -17,6 +17,7 @@ use Core\Tool;
* @property \Model\Task $task
* @property \Model\TaskCreation $taskCreation
* @property \Model\TaskModification $taskModification
* @property \Model\TaskDuplication $taskDuplication
* @property \Model\TaskFinder $taskFinder
* @property \Model\TaskStatus $taskStatus
*/

View File

@@ -64,9 +64,7 @@ class TaskDuplicateAnotherProject extends Base
*/
public function doAction(array $data)
{
$task = $this->taskFinder->getById($data['task_id']);
$this->task->duplicateToAnotherProject($this->getParam('project_id'), $task);
return true;
return (bool) $this->taskDuplication->duplicateToProject($data['task_id'], $this->getParam('project_id'));
}
/**

View File

@@ -64,9 +64,7 @@ class TaskMoveAnotherProject extends Base
*/
public function doAction(array $data)
{
$task = $this->taskFinder->getById($data['task_id']);
$this->task->moveToAnotherProject($this->getParam('project_id'), $task);
return true;
return $this->taskDuplication->moveToProject($data['task_id'], $this->getParam('project_id'));
}
/**