diff options
Diffstat (limited to 'app')
-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).')'; } /** |