From 8f669a679a3741f8092693a4697aff4c50067136 Mon Sep 17 00:00:00 2001 From: kn Date: Fri, 9 Oct 2026 15:55:16 +0200 Subject: [PATCH] Show the end time of failed executions in /api/executions Failed (e.g. aborted) executions also have an end time stamp, but the execution list only read it for finished ones, so the client showed the end time as a formatted Unix time stamp 0 (Jan 1, 1970). --- Implementation/API/amc_api_handler_executions.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Implementation/API/amc_api_handler_executions.cpp b/Implementation/API/amc_api_handler_executions.cpp index 6057d5bf..35d4926f 100644 --- a/Implementation/API/amc_api_handler_executions.cpp +++ b/Implementation/API/amc_api_handler_executions.cpp @@ -87,7 +87,8 @@ void CAPIHandler_Executions::handleListExecutionsRequest(CJSONWriter& writer, CA uint64_t nStartTimeStamp = pExecution->GetStartTimeStampInMicroseconds(); uint64_t nEndTimeStamp = 0; - if (status == LibMCData::eBuildJobExecutionStatus::Finished) { + // Failed (e.g. aborted) executions also have an end time stamp. + if ((status == LibMCData::eBuildJobExecutionStatus::Finished) || (status == LibMCData::eBuildJobExecutionStatus::Failed)) { nEndTimeStamp = pExecution->GetEndTimeStampInMicroseconds(); }