Module: tools Branch: master Commit: 13939bdc2e8dc09154037527b7d79ee8c5a19d77 URL: https://source.winehq.org/git/tools.git/?a=commit;h=13939bdc2e8dc09154037527...
Author: Francois Gouget fgouget@codeweavers.com Date: Thu Mar 4 14:26:02 2021 +0100
testbot/web: Fix the task count on the index page.
Tasks that have not started yet must be counted too!
Signed-off-by: Francois Gouget fgouget@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
testbot/web/index.pl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/testbot/web/index.pl b/testbot/web/index.pl index 603f295..1336d1e 100644 --- a/testbot/web/index.pl +++ b/testbot/web/index.pl @@ -239,6 +239,8 @@ package StatusPage; use ObjectModel::CGI::FreeFormPage; our @ISA = qw(ObjectModel::CGI::FreeFormPage);
+use ObjectModel::Collection; + use WineTestBot::Config; use WineTestBot::Engine::Notify; use WineTestBot::Jobs; @@ -357,7 +359,8 @@ sub GenerateBody($) # pretty rare queued jobs. But doing so one job at a time is inefficient so # do it all at once now and store the results in ...->{JobsInfo}. my $Tasks = CreateTasks(); - $Tasks->AddFilter("Started", [$CutOff], ">="); + $Tasks->AddFilter(FilterOr(FilterValue("Started", ">=", [$CutOff]), + FilterNull("Started"))); foreach my $Task (@{$Tasks->GetItems()}) { my $JobInfo = ($JobsCollectionBlock->{JobsInfo}->{$Task->JobId} ||= {});