From 96a0209df692a64e9a0f3b4c1dba7e56bcc9942a Mon Sep 17 00:00:00 2001 From: Peter Burnett Date: Wed, 1 Jun 2022 09:34:45 +1000 Subject: [PATCH] Updated history filter to allow 0th step to be handled --- classes/output/workflowhistory/renderer.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/classes/output/workflowhistory/renderer.php b/classes/output/workflowhistory/renderer.php index a851828..d8e5a57 100644 --- a/classes/output/workflowhistory/renderer.php +++ b/classes/output/workflowhistory/renderer.php @@ -104,7 +104,7 @@ public function render_workflowhistory_table($workflowid, $searchparams = [], $d $statuswhere = []; if (!empty($searchparams['filterpassed'])) { $sqlparams['filterpassed'] = $searchparams['filterpassed']; - $statuswhere[] = ' ((tfh.failedstep = 0 OR tfh.failedstep IS NULL) AND (tfh.errorstep = 0 OR tfh.errorstep IS NULL))'; + $statuswhere[] = ' ((tfh.failedstep IS NULL) AND (tfh.errorstep IS NULL))'; } if (!empty($searchparams['filtercancelled'])) { @@ -119,12 +119,12 @@ public function render_workflowhistory_table($workflowid, $searchparams = [], $d if (!empty($searchparams['filtererrored'])) { $sqlparams['filtererrored'] = $searchparams['filtererrored']; - $statuswhere[] = ' (tfh.errorstep > 0) '; + $statuswhere[] = ' (tfh.errorstep IS NOT NULL) '; } if (!empty($searchparams['filterfailed'])) { $sqlparams['filterfailed'] = $searchparams['filterfailed']; - $statuswhere[] = ' (tfh.failedstep > 0) '; + $statuswhere[] = ' (tfh.failedstep IS NOT NULL) '; } if (count($statuswhere) > 0) {