Adds missing properties when creating a new version of a published DMP.
This commit is contained in:
parent
9d8de0c2fb
commit
eba3ee137d
|
@ -584,7 +584,11 @@ public class DataManagementPlanManager {
|
|||
|
||||
if (latestVersionDMP.get(0).getVersion().equals(oldDmp.getVersion())) {
|
||||
DMP newDmp = dataManagementPlan.toDataModel();
|
||||
|
||||
if (oldDmp.isPublic()) {
|
||||
newDmp.setPublic(true);
|
||||
newDmp.setFinalizedAt(new Date());
|
||||
newDmp.setPublishedAt(new Date());
|
||||
}
|
||||
UserInfo user = apiContext.getOperationsContext().getBuilderFactory().getBuilder(UserInfoBuilder.class).id(principal.getId()).build();
|
||||
createOrganisationsIfTheyDontExist(newDmp, databaseRepository.getOrganisationDao());
|
||||
createResearchersIfTheyDontExist(newDmp, databaseRepository.getResearcherDao(), user);
|
||||
|
|
Loading…
Reference in New Issue