diff --git a/packages/lib-classifier/src/store/ClassificationStore.js b/packages/lib-classifier/src/store/ClassificationStore.js index bcf0ceeee83..33f53fee3f5 100644 --- a/packages/lib-classifier/src/store/ClassificationStore.js +++ b/packages/lib-classifier/src/store/ClassificationStore.js @@ -88,6 +88,10 @@ const ClassificationStore = types if (validClassificationReference) { const classification = self.active + if (classification?.annotations.size === 0) { + // update startedAt if we're starting a new classification + classification.metadata.startedAt = (new Date()).toISOString() + } if (classification) { return classification.addAnnotation(task, annotationValue) } diff --git a/packages/lib-classifier/src/store/ClassificationStore.spec.js b/packages/lib-classifier/src/store/ClassificationStore.spec.js index fdd77dea430..f9a8bd2c0cf 100644 --- a/packages/lib-classifier/src/store/ClassificationStore.spec.js +++ b/packages/lib-classifier/src/store/ClassificationStore.spec.js @@ -128,7 +128,6 @@ describe('Model > ClassificationStore', function () { classifications = rootStore.classifications classifications.setOnComplete(snapshot => { - console.log(snapshot) submittedClassification = snapshot }) const taskSnapshot = Object.assign({}, singleChoiceTaskSnapshot, { taskKey: singleChoiceAnnotationSnapshot.task })