From 0304be1e3a2c22c33d14b9a91e523d5e4c4570a2 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Mon, 19 Mar 2018 18:15:24 +0200 Subject: [PATCH] Fix for task report --- app/Models/Task.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Models/Task.php b/app/Models/Task.php index d6b01e2a60..5c54c6ba42 100644 --- a/app/Models/Task.php +++ b/app/Models/Task.php @@ -149,7 +149,7 @@ class Task extends EntityModel $endTime = min($endTime, $endTimeCutoff); } - $duration += $endTime - $startTime; + $duration += max($endTime - $startTime, 0); } return $duration;