summaryrefslogtreecommitdiff
path: root/app/Model/Subtask.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-06-24 11:17:34 -0400
committerFrederic Guillot <fred@kanboard.net>2015-06-24 11:17:34 -0400
commit58c96b8c4ec3f326b25e6b55f133fc067345cd57 (patch)
tree137fb04472ed9161d0209fdb2af84f6f57859bec /app/Model/Subtask.php
parentbf22ea4694f6b0aadb6a6975f9324a7138b07278 (diff)
Auto assign subtasks when status is toggled
Diffstat (limited to 'app/Model/Subtask.php')
-rw-r--r--app/Model/Subtask.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/Model/Subtask.php b/app/Model/Subtask.php
index a869ae91..ee000e32 100644
--- a/app/Model/Subtask.php
+++ b/app/Model/Subtask.php
@@ -346,6 +346,10 @@ class Subtask extends Base
'task_id' => $subtask['task_id'],
);
+ if (empty($subtask['user_id']) && $this->userSession->isLogged()) {
+ $values['user_id'] = $this->userSession->getId();
+ }
+
return $this->update($values);
}