Merge branch 'master' of gitlab.eudat.eu:dmp/OpenAIRE-EUDAT-DMP-service-pilot

This commit is contained in:
annampak 2017-11-08 10:59:25 +02:00
commit 27ae8f1ef1
1 changed files with 5 additions and 1 deletions

View File

@ -303,6 +303,7 @@ public class DMPs {
DMP clone = dMPDao.read(dmp.getId());
try {
Set<UserInfo> users = new HashSet<UserInfo>();
@ -313,8 +314,11 @@ public class DMPs {
clone.setModified(new Date());
clone.setStatus(new Short("0"));
String cloneLabel = dmp.getLabel();
if(cloneLabel==null || cloneLabel.isEmpty()) //if the provided label is null or empty, use parent's label + "_clone"
cloneLabel = clone.getLabel()+"_clone";
clone.setVersion(clone.getVersion()+1);
clone.setLabel(clone.getLabel()+"_clone");
clone.setLabel(cloneLabel);
clone.setPrevious(clone.getId());