summaryrefslogtreecommitdiff
path: root/app/Action/TaskDuplicateAnotherProject.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Action/TaskDuplicateAnotherProject.php')
-rw-r--r--app/Action/TaskDuplicateAnotherProject.php14
1 files changed, 11 insertions, 3 deletions
diff --git a/app/Action/TaskDuplicateAnotherProject.php b/app/Action/TaskDuplicateAnotherProject.php
index d70d2ee8..d6d8d51f 100644
--- a/app/Action/TaskDuplicateAnotherProject.php
+++ b/app/Action/TaskDuplicateAnotherProject.php
@@ -62,7 +62,10 @@ class TaskDuplicateAnotherProject extends Base
{
return array(
'task_id',
- 'column_id',
+ 'task' => array(
+ 'project_id',
+ 'column_id',
+ )
);
}
@@ -76,7 +79,12 @@ class TaskDuplicateAnotherProject extends Base
public function doAction(array $data)
{
$destination_column_id = $this->columnModel->getFirstColumnId($this->getParam('project_id'));
- return (bool) $this->taskProjectDuplicationModel->duplicateToProject($data['task_id'], $this->getParam('project_id'), null, $destination_column_id);
+ return (bool) $this->taskProjectDuplicationModel->duplicateToProject(
+ $data['task_id'],
+ $this->getParam('project_id'),
+ null,
+ $destination_column_id
+ );
}
/**
@@ -88,6 +96,6 @@ class TaskDuplicateAnotherProject extends Base
*/
public function hasRequiredCondition(array $data)
{
- return $data['column_id'] == $this->getParam('column_id') && $data['project_id'] != $this->getParam('project_id');
+ return $data['task']['column_id'] == $this->getParam('column_id') && $data['task']['project_id'] != $this->getParam('project_id');
}
}