From 353117f44e02e47019b846806fc11bad7df57152 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sun, 15 Feb 2015 21:00:04 -0500 Subject: Display unfinished subtasks in the calendar --- app/Model/SubtaskTimeTracking.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'app/Model') diff --git a/app/Model/SubtaskTimeTracking.php b/app/Model/SubtaskTimeTracking.php index abd8c8fc..1e7e252e 100644 --- a/app/Model/SubtaskTimeTracking.php +++ b/app/Model/SubtaskTimeTracking.php @@ -169,7 +169,13 @@ class SubtaskTimeTracking extends Base $start_column = $this->db->escapeIdentifier('start'); $end_column = $this->db->escapeIdentifier('end'); - return "(($start_column >= '$start_time' AND $start_column <= '$end_time') OR ($start_column <= '$start_time' AND $end_column >= '$start_time'))"; + $conditions = array( + "($start_column >= '$start_time' AND $start_column <= '$end_time')", + "($start_column <= '$start_time' AND $end_column >= '$start_time')", + "($start_column <= '$start_time' AND $end_column = '0')", + ); + + return '('.implode(' OR ', $conditions).')'; } /** -- cgit v1.2.3