Skip to content
Snippets Groups Projects
Commit dd47338d authored by juanf's avatar juanf
Browse files

SSDM-1615 : Copy Parents working on the ELN.

SVN: 33722
parent 3a0a19c2
No related branches found
No related tags found
No related merge requests found
......@@ -273,8 +273,12 @@ function SampleFormController(mainController, mode, sample) {
var annotatedSample = annotationsObj[permId];
var annotatedSampleType = annotatedSample.sampleType;
if(jQuery.inArray(annotatedSampleType, copyAnnotationsOfTypes) !== -1) {
annotatedSample["CONTAINED"] = _this._sampleFormModel.sample.identifier;
finalAnnotations[permId] = annotatedSample;
if(newAnnotations[permId]) { //If existed already maintain it, probably has modifications
finalAnnotations[permId] = newAnnotations[permId];
} else {
annotatedSample["CONTAINED"] = _this._sampleFormModel.sample.identifier;
finalAnnotations[permId] = annotatedSample;
}
}
}
}
......@@ -294,7 +298,11 @@ function SampleFormController(mainController, mode, sample) {
nextAction();
}
mainController.serverFacade.searchWithIdentifier(null, builAnnotationsAction, newParents);
if(newParents.length !== 0) {
mainController.serverFacade.searchWithIdentifier(null, builAnnotationsAction, newParents);
} else {
nextAction();
}
}
this._createUpdateCopySampleCallback = function(_this, isCopyWithNewCode, response) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment