Create TaskDuplication model
This commit is contained in:
@@ -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
|
||||
*/
|
||||
|
||||
@@ -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'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user