summaryrefslogtreecommitdiff
path: root/app/Controller
diff options
context:
space:
mode:
authorKonstantin Vorobyev <vorobyev@coacha.com>2017-02-16 13:04:48 +0900
committerKonstantin Vorobyev <vorobyev@coacha.com>2017-02-16 13:06:34 +0900
commit7c031c100ef04983005cb637631638756c3297ab (patch)
treef76557fc98072fb5bd5fdb85a56be7a840c78670 /app/Controller
parent5e0cf1472ef0b019c9d50d61ba944e977e28b104 (diff)
Fix #3031: Auto-assign sub-task to task owner
Diffstat (limited to 'app/Controller')
-rw-r--r--app/Controller/SubtaskController.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/app/Controller/SubtaskController.php b/app/Controller/SubtaskController.php
index 134b057e..5fa55f6b 100644
--- a/app/Controller/SubtaskController.php
+++ b/app/Controller/SubtaskController.php
@@ -49,6 +49,7 @@ class SubtaskController extends BaseController
{
$values = array(
'task_id' => $task['id'],
+ 'user_id' => $task['owner_id'],
'another_subtask' => $this->request->getIntegerParam('another_subtask', 0)
);
@@ -76,7 +77,12 @@ class SubtaskController extends BaseController
}
if (isset($values['another_subtask']) && $values['another_subtask'] == 1) {
- return $this->create(array('project_id' => $task['project_id'], 'task_id' => $task['id'], 'another_subtask' => 1));
+ return $this->create(array(
+ 'project_id' => $task['project_id'],
+ 'task_id' => $task['id'],
+ 'user_id' => $values['user_id'],
+ 'another_subtask' => 1
+ ));
}
return $this->response->redirect($this->helper->url->to('TaskViewController', 'show', array('project_id' => $task['project_id'], 'task_id' => $task['id']), 'subtasks'), true);