Skip to content

Commit

Permalink
Clone size fixed.
Browse files Browse the repository at this point in the history
  • Loading branch information
gitorko committed Feb 19, 2016
1 parent 96c52c0 commit 04a6a12
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,12 @@ public String testcaseClone(Model model, HttpServletRequest request, HttpSession
newTc.setFolderId(tc.getFolderId());
newTc.setLanguage(tc.getLanguage());
newTc.setMethodName(tc.getMethodName());
newTc.setName(tc.getName() + "_CLONE");

String newTCName = tc.getName();
if (newTCName.length() > 84) {
newTCName = newTCName.substring(0, 84) + "_CLONE";
}
newTc.setName(newTCName);
newTc.setPriority(tc.getPriority());
newTc.setProduct(tc.getProduct());
newTc.setTestScriptFile(tc.getTestScriptFile());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,12 @@ public String cloneTestplan(HttpSession session, HttpServletRequest request, Mod
EcTestplan tpObj = tpDao.findOne(testplanId);
EcTestplan newTpObj = new EcTestplan();
newTpObj.setSlug(BizUtil.INSTANCE.getSlug());
newTpObj.setName(tpObj.getName() + "_CLONE");

String newTPName = tpObj.getName();
if (newTPName.length() > 84) {
newTPName = newTPName.substring(0, 84) + "_CLONE";
}
newTpObj.setName(newTPName);
newTpObj.setCreator((String) session.getAttribute("authName"));
newTpObj.setEnabled(tpObj.getEnabled());
newTpObj.setEndDate(tpObj.getEndDate());
Expand Down

0 comments on commit 04a6a12

Please sign in to comment.