|
@@ -98,11 +98,14 @@ public class CopyCaseService {
|
|
|
if(caseEntity == null){
|
|
|
throw new BusinessException(ResultCode.CASE_NOT_EXIST);
|
|
|
}
|
|
|
- String oldProjectId = caseEntity.getTmProjectId();
|
|
|
+
|
|
|
caseEntity.setCaseId(null);
|
|
|
caseEntity.setCaseTitle(caseEntity.getCaseTitle()+"(copy)");
|
|
|
- String newProjectId = cpProject(oldProjectId);
|
|
|
- caseEntity.setTmProjectId(newProjectId);
|
|
|
+ if(caseEntity.getTmProjectId() != null){
|
|
|
+ String oldProjectId = caseEntity.getTmProjectId();
|
|
|
+ String newProjectId = cpProject(oldProjectId);
|
|
|
+ caseEntity.setTmProjectId(newProjectId);
|
|
|
+ }
|
|
|
caseService.save(caseEntity);
|
|
|
return caseEntity.getCaseId();
|
|
|
}
|