From 62827e6cf470449c117624058fb36ad94804bcc0 Mon Sep 17 00:00:00 2001 From: emkael Date: Tue, 5 May 2020 14:25:42 +0200 Subject: Time tracking related plugins --- .../Action/SubtaskTimerMoveTaskColumn.php | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 plugins/TimeMachine/Action/SubtaskTimerMoveTaskColumn.php (limited to 'plugins/TimeMachine/Action/SubtaskTimerMoveTaskColumn.php') diff --git a/plugins/TimeMachine/Action/SubtaskTimerMoveTaskColumn.php b/plugins/TimeMachine/Action/SubtaskTimerMoveTaskColumn.php new file mode 100644 index 00000000..e6d2217b --- /dev/null +++ b/plugins/TimeMachine/Action/SubtaskTimerMoveTaskColumn.php @@ -0,0 +1,40 @@ +userSession->getId(); + $subtaskID = $this->subtaskModel->create(array( + 'title' => $this->getParam('subtask'), + 'user_id' => $userId, + 'task_id' => $data['task']['id'], + 'status' => SubtaskModel::STATUS_INPROGRESS, + )); + + if ($subtaskID !== false) { + return $this->subtaskTimeTrackingModel->toggleTimer($subtaskID, $userId, SubtaskModel::STATUS_INPROGRESS); + } + + return false; + } +} -- cgit v1.2.3