Skip to content

Commit a7e0b81

Browse files
authored
Merge pull request #188 from catalyst/filter-step0
Updated history filter to allow 0th step to be handled
2 parents e3c3e96 + 96a0209 commit a7e0b81

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

classes/output/workflowhistory/renderer.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public function render_workflowhistory_table($workflowid, $searchparams = [], $d
104104
$statuswhere = [];
105105
if (!empty($searchparams['filterpassed'])) {
106106
$sqlparams['filterpassed'] = $searchparams['filterpassed'];
107-
$statuswhere[] = ' ((tfh.failedstep = 0 OR tfh.failedstep IS NULL) AND (tfh.errorstep = 0 OR tfh.errorstep IS NULL))';
107+
$statuswhere[] = ' ((tfh.failedstep IS NULL) AND (tfh.errorstep IS NULL))';
108108
}
109109

110110
if (!empty($searchparams['filtercancelled'])) {
@@ -119,12 +119,12 @@ public function render_workflowhistory_table($workflowid, $searchparams = [], $d
119119

120120
if (!empty($searchparams['filtererrored'])) {
121121
$sqlparams['filtererrored'] = $searchparams['filtererrored'];
122-
$statuswhere[] = ' (tfh.errorstep > 0) ';
122+
$statuswhere[] = ' (tfh.errorstep IS NOT NULL) ';
123123
}
124124

125125
if (!empty($searchparams['filterfailed'])) {
126126
$sqlparams['filterfailed'] = $searchparams['filterfailed'];
127-
$statuswhere[] = ' (tfh.failedstep > 0) ';
127+
$statuswhere[] = ' (tfh.failedstep IS NOT NULL) ';
128128
}
129129

130130
if (count($statuswhere) > 0) {

0 commit comments

Comments
 (0)