From d3ae8d2acb218c8e1bc50ed1b92c19016e9214ee Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Thu, 26 Mar 2015 20:49:37 -0400 Subject: Display subtask estimates in the user calendar according to the timetable --- app/Controller/Calendar.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'app/Controller/Calendar.php') diff --git a/app/Controller/Calendar.php b/app/Controller/Calendar.php index 6cfa2bad..49c7f56e 100644 --- a/app/Controller/Calendar.php +++ b/app/Controller/Calendar.php @@ -82,7 +82,9 @@ class Calendar extends Base $subtask_timeslots = $this->subtaskTimeTracking->getUserCalendarEvents($user_id, $start, $end); - $this->response->json(array_merge($due_tasks, $subtask_timeslots)); + $subtask_forcast = $this->config->get('subtask_forecast') == 1 ? $this->subtaskForecast->getCalendarEvents($user_id, $end) : array(); + + $this->response->json(array_merge($due_tasks, $subtask_timeslots, $subtask_forcast)); } /** -- cgit v1.2.3