Skip to content

Commit

Permalink
Fix date filter bug when subproject specified (#1797)
Browse files Browse the repository at this point in the history
The curly braces around the date filter for the index page were not
properly placed, leading to the filter being disabled for most common
cases. This bugfix will be backported to CDash 3.2.
  • Loading branch information
williamjallen committed Nov 15, 2023
1 parent 8212604 commit 2f91194
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions app/cdash/app/Controller/Api/Index.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,13 +159,13 @@ public function getDailyBuilds(): array
} elseif (!is_numeric($this->subProjectId)) {
// Only show builds that are not children.
$sql .= ' AND (b.parentid = -1 OR b.parentid = 0) ';
}

// If the filter data doesn't have a date clause, use this as a default
if (!$this->filterdata['hasdateclause']) {
$sql .= " AND b.starttime < ? AND b.starttime >= ? ";
$query_params[] = $this->endDate;
$query_params[] = $this->beginDate;
}
// If the filter data doesn't have a date clause, use this as a default
if (!$this->filterdata['hasdateclause']) {
$sql .= " AND b.starttime < ? AND b.starttime >= ? ";
$query_params[] = $this->endDate;
$query_params[] = $this->beginDate;
}

// Should we query by subproject?
Expand Down

0 comments on commit 2f91194

Please sign in to comment.