Skip to content

Commit

Permalink
Fixes #5020
Browse files Browse the repository at this point in the history
  • Loading branch information
gianlucapiccolo authored and nilmerg committed Jun 22, 2023
1 parent 59fc7dd commit db9888b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ protected function requireFilterColumns(Filter $filter)
protected function joinBaseTables()
{
parent::joinBaseTables(true);
$this->select->where("hdh.actual_end_time > '1970-01-02 00:00:00'");
$this->select->where(
"hdh.actual_end_time > '1970-01-02 00:00:00' AND hdh.was_started = 1 AND hdh.was_cancelled = 0"
);
$this->columnMap['downtimehistory']['type'] = "('dt_end')";
$this->columnMap['downtimehistory']['timestamp'] = str_replace(
'actual_start_time',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@ protected function joinBaseTables()
"hdh.actual_start_time > '1970-01-02 00:00:00'"
);
}

$this->select->where(
"hdh.was_started = 1 AND hdh.was_cancelled = 0"
);
$this->joinedVirtualTables['downtimehistory'] = true;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ protected function requireFilterColumns(Filter $filter)
protected function joinBaseTables()
{
parent::joinBaseTables(true);
$this->select->where("sdh.actual_end_time > '1970-01-02 00:00:00'");
$this->select->where(
"sdh.actual_end_time > '1970-01-02 00:00:00' AND sdh.was_started = 1 AND sdh.was_cancelled = 0"
);
$this->columnMap['downtimehistory']['type'] = "('dt_end')";
$this->columnMap['downtimehistory']['timestamp'] = str_replace(
'actual_start_time',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ protected function joinBaseTables()
"sdh.actual_start_time > '1970-01-02 00:00:00'"
);
}
$this->select->where(
"sdh.was_started = 1 AND sdh.was_cancelled = 0"
);

$this->joinedVirtualTables['downtimehistory'] = true;
}
Expand Down

0 comments on commit db9888b

Please sign in to comment.