summaryrefslogtreecommitdiff
path: root/app/Model
diff options
context:
space:
mode:
authorJuan Pablo Canepa <jpcanepa@gmail.com>2017-12-14 10:44:23 -0300
committerfguillot <fred@kanboard.net>2017-12-14 10:56:54 -0800
commit2c72a283f2d51034f85f4e2ca8b194d304a3c433 (patch)
treeb073f6cb83de0cde1a9fa6ca60e37e3c49ff8fe7 /app/Model
parent8d206a2f4ee32f5d3fd0c8128dff4c2f1e135a7a (diff)
Copy category on new task when create a task from sub-task
Diffstat (limited to 'app/Model')
-rw-r--r--app/Model/SubtaskTaskConversionModel.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/Model/SubtaskTaskConversionModel.php b/app/Model/SubtaskTaskConversionModel.php
index 8bf83d76..dd6b479d 100644
--- a/app/Model/SubtaskTaskConversionModel.php
+++ b/app/Model/SubtaskTaskConversionModel.php
@@ -23,6 +23,7 @@ class SubtaskTaskConversionModel extends Base
public function convertToTask($project_id, $subtask_id)
{
$subtask = $this->subtaskModel->getById($subtask_id);
+ $parent_task = $this->taskFinderModel->getById($subtask['task_id']);
$task_id = $this->taskCreationModel->create(array(
'project_id' => $project_id,
@@ -30,6 +31,7 @@ class SubtaskTaskConversionModel extends Base
'time_estimated' => $subtask['time_estimated'],
'time_spent' => $subtask['time_spent'],
'owner_id' => $subtask['user_id'],
+ 'category_id' => $parent_task['category_id']
));
if ($task_id !== false) {