diff --git a/api/quantification/create.go b/api/quantification/create.go index 5f163ea1..8e06226b 100644 --- a/api/quantification/create.go +++ b/api/quantification/create.go @@ -378,12 +378,17 @@ func (r *quantNodeRunner) triggerPiquantNodes(wg *sync.WaitGroup) { Params: r.quantStartSettings, Elements: elements, Status: &protos.JobStatus{ - JobId: r.jobId, - Status: protos.JobStatus_COMPLETE, - Message: completeMsg, - EndUnixTimeSec: uint32(now), - OutputFilePath: quantOutPath, - OtherLogFiles: piquantLogList, + JobId: r.jobId, + JobItemId: r.jobId, + Status: protos.JobStatus_COMPLETE, + Message: completeMsg, + StartUnixTimeSec: r.quantStartSettings.StartUnixTimeSec, + EndUnixTimeSec: uint32(now), + OutputFilePath: quantOutPath, + OtherLogFiles: piquantLogList, + Name: r.quantStartSettings.UserParams.Name, + Elements: r.quantStartSettings.UserParams.Elements, + RequestorUserId: r.quantStartSettings.RequestorUserId, }, } diff --git a/api/quantification/importCSV.go b/api/quantification/importCSV.go index c9278741..68c410c1 100644 --- a/api/quantification/importCSV.go +++ b/api/quantification/importCSV.go @@ -97,12 +97,16 @@ func ImportQuantCSV( }, Elements: elements, Status: &protos.JobStatus{ - JobId: quantId, - Status: protos.JobStatus_COMPLETE, - Message: csvOrigin + " quantification processed", - OtherLogFiles: []string{}, - EndUnixTimeSec: uint32(ownerItem.CreatedUnixSec), - OutputFilePath: quantOutPath, + JobId: quantId, + JobItemId: quantId, + Status: protos.JobStatus_COMPLETE, + Message: csvOrigin + " quantification processed", + OtherLogFiles: []string{}, + EndUnixTimeSec: uint32(ownerItem.CreatedUnixSec), + OutputFilePath: quantOutPath, + StartUnixTimeSec: uint32(ownerItem.CreatedUnixSec), + Name: quantName, + Elements: elements, }, } diff --git a/api/ws/handlers/quantification-retrieval.go b/api/ws/handlers/quantification-retrieval.go index 5af6fb39..a3376fc2 100644 --- a/api/ws/handlers/quantification-retrieval.go +++ b/api/ws/handlers/quantification-retrieval.go @@ -49,6 +49,12 @@ func HandleQuantGetReq(req *protos.QuantGetReq, hctx wsHelpers.HandlerContext) ( } } + // We seem to have some old quants where the status struct says start time was 0, but there is another start time in quant params, so + // substitute a non-zero value in this case + if dbItem.Status.StartUnixTimeSec == 0 && dbItem.Params.StartUnixTimeSec > 0 { + dbItem.Status.StartUnixTimeSec = dbItem.Params.StartUnixTimeSec + } + dbItem.Owner = wsHelpers.MakeOwnerSummary(ownerItem, hctx.SessUser, hctx.Svcs.MongoDB, hctx.Svcs.TimeStamper) return &protos.QuantGetResp{