mskcc / LimsRest

the restful service used by the IGO LIMS
2 stars 2 forks source link

getStages returns ordered stage map #170

Closed DavidStreid closed 4 years ago

DavidStreid commented 4 years ago

Fixes issue where the summary calculations were being done on an unordered list of stages for a request

Fix (Note - "Awaiting Processing" should be come first in the ordering of stages. This causes the summary tab to report a "completed" number of 1, from "Awaiting Processing", instead of the 81 it should from "Data QC")

BEFORE

{
   "request": {
   "summary": {
   "total": 105,
   "RecentDeliveryDate": 1594836487057,
   "stagesComplete": false,
   "isIgoComplete": true,
   "completed": 1,
   "failed": 0
},
"stages": [
...
{
   "stage": "Data QC",
   "completedSamples": 81,
   "totalSamples": 100,
   "startTime": 1582213973966,
   "updateTime": 1583871263655,
   "complete": false,
   "failedSamples": 0
},
{
   "stage": "Awaiting Processing",
   "completedSamples": 1,
   "totalSamples": 1,
   "startTime": 1581004517481,
   "updateTime": 1583354681173,
   "complete": true,
   "failedSamples": 0
}
],

AFTER

{
   "request": {
   "summary": {
   "total": 105,
   "RecentDeliveryDate": 1594836487057,
   "stagesComplete": false,
   "isIgoComplete": true,
   "completed": 81,
   "failed": 0
},
"stages": [
...

{
   "stage": "Awaiting Processing",
   "completedSamples": 1,
   "totalSamples": 1,
   "startTime": 1581004517481,
   "updateTime": 1583354681173,
   "complete": true,
   "failedSamples": 0
},
{
   "stage": "Data QC",
   "completedSamples": 81,
   "totalSamples": 100,
   "startTime": 1582213973966,
   "updateTime": 1583871263655,
   "complete": false,
   "failedSamples": 0
}
],
mskbot commented 4 years ago

Can one of the admins verify this patch?