From 49f71002e17f79f40ba45fbd3bc685711229d656 Mon Sep 17 00:00:00 2001 From: Paul Sarando Date: Fri, 9 Aug 2024 18:08:45 -0700 Subject: [PATCH] CORE-2002 Fix AnalysisRunTime display for Tapis jobs This will also fix the duration display for analyses stories, since they all share a job history mock, with a Tapis job in the first step. --- src/components/analyses/useAnalysisRunTime.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/analyses/useAnalysisRunTime.js b/src/components/analyses/useAnalysisRunTime.js index 0f01e3c61..67da91799 100644 --- a/src/components/analyses/useAnalysisRunTime.js +++ b/src/components/analyses/useAnalysisRunTime.js @@ -42,9 +42,11 @@ function useAnalysisRunTime( // Make sure we're looking at the correct step // (e.g. step_type === "Interactive" or step_number === 1) const step = resp?.steps?.find(stepFilterFn); - // Find the first Running update + // Find the first Running update, ignoring case for Tapis jobs. const runningUpdate = step?.updates?.find( - (update) => update.status === analysisStatus.RUNNING + (update) => + update.status.toUpperCase() === + analysisStatus.RUNNING.toUpperCase() ); // Record the timestamp setRunningStart(parseInt(runningUpdate?.timestamp || 0));