Fixes bug on not assigning finalize Date on Datasets and DMPs.

This commit is contained in:
gkolokythas 2019-06-26 16:34:33 +03:00
parent 76831573ff
commit 6607714e4c
2 changed files with 5 additions and 0 deletions

View File

@ -190,6 +190,8 @@ public class DatasetWizardModel implements DataModel<Dataset, DatasetWizardModel
entity.setReference(this.reference);
entity.setUri(this.uri);
entity.setStatus(this.status);
if (this.status == (int) Dataset.Status.FINALISED.getValue())
entity.setFinalizedAt(new Date());
DMP dmp = new DMP();
dmp.setId(this.dmp.getId());
entity.setDmp(dmp);

View File

@ -271,6 +271,9 @@ public class DataManagementPlanEditorModel implements DataModel<DMP, DataManagem
}
dataManagementPlanEntity.setStatus((short) this.status);
if (this.status == (int) DMP.DMPStatus.FINALISED.getValue()) {
dataManagementPlanEntity.setFinalizedAt(new Date());
}
dataManagementPlanEntity.setDescription(this.description);
if (this.profiles != null) {
Set<DatasetProfile> datasetProfiles = new HashSet<>();