fix(测试跟踪): 测试计划长度设置为最长后点击执行报错
--bug=1012002 --user=李玉号 【测试跟踪】-测试计划长度 设置为128最长后,点击执行 会报错 https://www.tapd.cn/55049933/s/1176469
This commit is contained in:
parent
2dde81bf50
commit
d65ba6a9cd
|
@ -286,6 +286,9 @@ public class TestPlanReportService {
|
|||
testPlanReport.setUpdateTime(System.currentTimeMillis());
|
||||
try {
|
||||
testPlanReport.setName(testPlan.getName() + "-" + DateUtils.getTimeString(new Date()));
|
||||
if (testPlanReport.getName().length() > 128) {
|
||||
testPlanReport.setName(testPlan.getName().substring(0, 106) + "-" + DateUtils.getTimeString(new Date()));
|
||||
}
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
|
||||
|
|
|
@ -1147,6 +1147,9 @@ public class TestPlanService {
|
|||
// 覆盖原内容
|
||||
targetPlan.setId(targetPlanId);
|
||||
targetPlan.setName(testPlan.getName() + "_" + UUID.randomUUID().toString().substring(0, 5) + "_COPY");
|
||||
if (targetPlan.getName().length() > 128) {
|
||||
targetPlan.setName(testPlan.getName().substring(0, 116) + "_" + UUID.randomUUID().toString().substring(0, 5) + "_COPY");
|
||||
}
|
||||
targetPlan.setStatus(TestPlanStatus.Prepare.name());
|
||||
targetPlan.setCreator(SessionUtils.getUserId());
|
||||
targetPlan.setCreateTime(System.currentTimeMillis());
|
||||
|
|
Loading…
Reference in New Issue