From 7f13b929a9ad8179962df1c56265b1199e3d1968 Mon Sep 17 00:00:00 2001 From: Jeroen De Meerleer Date: Mon, 2 Aug 2021 14:41:11 +0200 Subject: [PATCH] BUGFIX: getrunsforjob did only return failed runs --- src/Repository/Run.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Repository/Run.php b/src/Repository/Run.php index 9904fa1..d620256 100644 --- a/src/Repository/Run.php +++ b/src/Repository/Run.php @@ -13,11 +13,11 @@ class Run extends Repository const SUCCESS = 'S'; const MANUAL = 'M'; - public function getRunsForJob(int $id, $failed = true, $ordered = true): array + public function getRunsForJob(int $id, $onlyfailed = false, $ordered = true): array { $runsSql = "SELECT * FROM run WHERE job_id = :job"; $params = [':job' => $id]; - if ($failed) { + if ($onlyfailed) { $runsSql .= ' AND flags LIKE "%' . Run::FAILED . '%"'; } if ($ordered) $runsSql .= ' ORDER by timestamp DESC';