summaryrefslogtreecommitdiff
path: root/app/Console
diff options
context:
space:
mode:
Diffstat (limited to 'app/Console')
-rw-r--r--app/Console/TaskOverdueNotification.php20
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);