From 9b4e8c15458ab97d52f2be66d6d86f30ce3c700a Mon Sep 17 00:00:00 2001 From: Wouter van Os Date: Thu, 6 Sep 2018 23:43:10 +0200 Subject: [PATCH] Show schedules till they are completed Currently schedules are shown on the status page when they are in the status upcoming or in progress. But, when the scheduled time is in the past - it's hidden, even when it's still going on. This PR fixes this issue by hiding the maintenance when it's in the status completed, or the completed time has passed. --- app/Models/Schedule.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Models/Schedule.php b/app/Models/Schedule.php index 3f857cbd84d8..cab081de03c5 100644 --- a/app/Models/Schedule.php +++ b/app/Models/Schedule.php @@ -176,7 +176,7 @@ public function scopeInProgress(Builder $query) */ public function scopeFutureSchedules($query) { - return $query->whereIn('status', [self::UPCOMING, self::IN_PROGRESS])->where('scheduled_at', '>=', Carbon::now()); + return $query->whereIn('status', [self::UPCOMING, self::IN_PROGRESS])->where('completed_at', '>=', Carbon::now()); } /**