diff options
author | Frederic Guillot <fred@kanboard.net> | 2015-06-24 11:17:34 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2015-06-24 11:17:34 -0400 |
commit | 58c96b8c4ec3f326b25e6b55f133fc067345cd57 (patch) | |
tree | 137fb04472ed9161d0209fdb2af84f6f57859bec /app | |
parent | bf22ea4694f6b0aadb6a6975f9324a7138b07278 (diff) |
Auto assign subtasks when status is toggled
Diffstat (limited to 'app')
-rw-r--r-- | app/Model/Subtask.php | 4 |
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); } |