summaryrefslogtreecommitdiff
path: root/app/Action/TaskMoveColumnUnAssigned.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-07-19 22:38:30 -0400
committerFrederic Guillot <fred@kanboard.net>2016-07-19 22:38:30 -0400
commit390082aa41cb81610089163b1cc3a256f3b3c513 (patch)
tree1ada3964702ee536fe1486f34230f8e30a95d82e /app/Action/TaskMoveColumnUnAssigned.php
parentd9d37882228771bca0c7f53f5ffcef90ba7ac1c5 (diff)
Refactoring of internal task events
Diffstat (limited to 'app/Action/TaskMoveColumnUnAssigned.php')
-rw-r--r--app/Action/TaskMoveColumnUnAssigned.php19
1 files changed, 11 insertions, 8 deletions
diff --git a/app/Action/TaskMoveColumnUnAssigned.php b/app/Action/TaskMoveColumnUnAssigned.php
index c3ae9e1d..0e9a8a16 100644
--- a/app/Action/TaskMoveColumnUnAssigned.php
+++ b/app/Action/TaskMoveColumnUnAssigned.php
@@ -61,8 +61,13 @@ class TaskMoveColumnUnAssigned extends Base
{
return array(
'task_id',
- 'column_id',
- 'owner_id'
+ 'task' => array(
+ 'project_id',
+ 'column_id',
+ 'owner_id',
+ 'position',
+ 'swimlane_id',
+ )
);
}
@@ -75,14 +80,12 @@ class TaskMoveColumnUnAssigned 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
);
}
@@ -96,6 +99,6 @@ class TaskMoveColumnUnAssigned extends Base
*/
public function hasRequiredCondition(array $data)
{
- return $data['column_id'] == $this->getParam('src_column_id') && $data['owner_id'] == 0;
+ return $data['task']['column_id'] == $this->getParam('src_column_id') && $data['task']['owner_id'] == 0;
}
}