This commit is contained in:
parent
a7b251ed04
commit
503cf583dd
|
@ -303,6 +303,7 @@ public class DMPs {
|
||||||
|
|
||||||
DMP clone = dMPDao.read(dmp.getId());
|
DMP clone = dMPDao.read(dmp.getId());
|
||||||
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
Set<UserInfo> users = new HashSet<UserInfo>();
|
Set<UserInfo> users = new HashSet<UserInfo>();
|
||||||
|
@ -313,8 +314,11 @@ public class DMPs {
|
||||||
clone.setModified(new Date());
|
clone.setModified(new Date());
|
||||||
clone.setStatus(new Short("0"));
|
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.setVersion(clone.getVersion()+1);
|
||||||
clone.setLabel(clone.getLabel()+"_clone");
|
clone.setLabel(cloneLabel);
|
||||||
clone.setPrevious(clone.getId());
|
clone.setPrevious(clone.getId());
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue