diff options
author | Frederic Guillot <fred@kanboard.net> | 2015-02-15 21:00:04 -0500 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2015-02-15 21:00:04 -0500 |
commit | 353117f44e02e47019b846806fc11bad7df57152 (patch) | |
tree | cff6597cc6bccf36bd4d208bba15c16e82e4b5ec /app/Model | |
parent | 321b1914ef1ee4d7e1a39d60fddd1151cb195f9c (diff) |
Display unfinished subtasks in the calendar
Diffstat (limited to 'app/Model')
-rw-r--r-- | app/Model/SubtaskTimeTracking.php | 8 |
1 files changed, 7 insertions, 1 deletions
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).')'; } /** |