diff options
author | Frederic Guillot <fred@kanboard.net> | 2015-06-07 20:06:31 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2015-06-07 20:06:31 -0400 |
commit | 4f32352fe62e47ad5ea760eb00493bdc061b2407 (patch) | |
tree | 8d5f087907dd5cba196dbfc06e626b3146659e1f /app/Console | |
parent | 9d9e3afba2054bfa23ba6f019b7c8885c2d8415e (diff) |
Add user filter/condition for notifications
Diffstat (limited to 'app/Console')
-rw-r--r-- | app/Console/TaskOverdueNotification.php | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/app/Console/TaskOverdueNotification.php b/app/Console/TaskOverdueNotification.php index 86a7d1b9..3d254ae4 100644 --- a/app/Console/TaskOverdueNotification.php +++ b/app/Console/TaskOverdueNotification.php @@ -19,25 +19,7 @@ class TaskOverdueNotification extends Base protected function execute(InputInterface $input, OutputInterface $output) { - $projects = array(); - $tasks = $this->taskFinder->getOverdueTasks(); - - // Group tasks by project - foreach ($tasks as $task) { - $projects[$task['project_id']][] = $task; - } - - // Send notifications for each project - foreach ($projects as $project_id => $project_tasks) { - - $users = $this->notification->getUsersList($project_id); - - $this->notification->sendEmails( - 'task_due', - $users, - array('tasks' => $project_tasks, 'project' => $project_tasks[0]['project_name']) - ); - } + $tasks = $this->notification->sendOverdueTaskNotifications(); if ($input->getOption('show')) { $this->showTable($output, $tasks); |