summaryrefslogtreecommitdiff
path: root/app/Action/TaskMoveColumnCategoryChange.php
diff options
context:
space:
mode:
authorChristopher Geelen <christopher.geelen@vinotion.nl>2016-07-27 13:58:23 +0200
committerChristopher Geelen <christopher.geelen@vinotion.nl>2016-07-27 13:58:23 +0200
commit24745182724ca69092554eb5946e31584420f68a (patch)
tree386cdf7a8d7bf7ad2d80d938333bafbaf0fedcbc /app/Action/TaskMoveColumnCategoryChange.php
parent160c0b885eb4f1a1a1baa2b6b9fc6d99fdb80d0c (diff)
parent9649f7ba82ba7fe6a470abfe9f65e214cc68fa34 (diff)
Merge remote-tracking branch 'upstream/master'
Conflicts: app/Job/NotificationJob.php
Diffstat (limited to 'app/Action/TaskMoveColumnCategoryChange.php')
-rw-r--r--app/Action/TaskMoveColumnCategoryChange.php21
1 files changed, 12 insertions, 9 deletions
diff --git a/app/Action/TaskMoveColumnCategoryChange.php b/app/Action/TaskMoveColumnCategoryChange.php
index e4f88760..13d6ee4f 100644
--- a/app/Action/TaskMoveColumnCategoryChange.php
+++ b/app/Action/TaskMoveColumnCategoryChange.php
@@ -7,7 +7,7 @@ use Kanboard\Model\TaskModel;
/**
* Move a task to another column when the category is changed
*
- * @package action
+ * @package Kanboard\Action
* @author Francois Ferrand
*/
class TaskMoveColumnCategoryChange extends Base
@@ -60,8 +60,13 @@ class TaskMoveColumnCategoryChange extends Base
{
return array(
'task_id',
- 'column_id',
- 'category_id',
+ 'task' => array(
+ 'project_id',
+ 'column_id',
+ 'category_id',
+ 'position',
+ 'swimlane_id',
+ )
);
}
@@ -74,14 +79,12 @@ class TaskMoveColumnCategoryChange extends Base
*/
public function doAction(array $data)
{
- $original_task = $this->taskFinderModel->getById($data['task_id']);
-
return $this->taskPositionModel->movePosition(
- $data['project_id'],
+ $data['task']['project_id'],
$data['task_id'],
$this->getParam('dest_column_id'),
- $original_task['position'],
- $original_task['swimlane_id'],
+ $data['task']['position'],
+ $data['task']['swimlane_id'],
false
);
}
@@ -95,6 +98,6 @@ class TaskMoveColumnCategoryChange extends Base
*/
public function hasRequiredCondition(array $data)
{
- return $data['column_id'] != $this->getParam('dest_column_id') && $data['category_id'] == $this->getParam('category_id');
+ return $data['task']['column_id'] != $this->getParam('dest_column_id') && $data['task']['category_id'] == $this->getParam('category_id');
}
}