summaryrefslogtreecommitdiff
path: root/app/Model
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-02-15 21:00:04 -0500
committerFrederic Guillot <fred@kanboard.net>2015-02-15 21:00:04 -0500
commit353117f44e02e47019b846806fc11bad7df57152 (patch)
treecff6597cc6bccf36bd4d208bba15c16e82e4b5ec /app/Model
parent321b1914ef1ee4d7e1a39d60fddd1151cb195f9c (diff)
Display unfinished subtasks in the calendar
Diffstat (limited to 'app/Model')
-rw-r--r--app/Model/SubtaskTimeTracking.php8
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).')';
}
/**