fix(测试跟踪): 公共用例库复制用例报错
--bug=1013838 --user=李玉号 【测试跟踪】公共用例库 选择模块 点击复制按钮,报500 https://www.tapd.cn/55049933/s/1175720
This commit is contained in:
parent
78cf6301e1
commit
e5686f958d
|
@ -1754,6 +1754,9 @@ public class TestCaseService {
|
|||
String id = UUID.randomUUID().toString();
|
||||
batchCopy.setId(id);
|
||||
batchCopy.setName(ServiceUtils.getCopyName(batchCopy.getName()));
|
||||
if (batchCopy.getName().length() > 255) {
|
||||
batchCopy.setName(batchCopy.getName().substring(0, 250) + batchCopy.getName().substring(batchCopy.getName().length() - 5));
|
||||
}
|
||||
batchCopy.setCreateTime(System.currentTimeMillis());
|
||||
batchCopy.setUpdateTime(System.currentTimeMillis());
|
||||
batchCopy.setCreateUser(SessionUtils.getUserId());
|
||||
|
@ -2588,6 +2591,9 @@ public class TestCaseService {
|
|||
String oldTestCaseId = testCase.getId();
|
||||
testCase.setId(id);
|
||||
testCase.setName(ServiceUtils.getCopyName(testCase.getName()));
|
||||
if (testCase.getName().length() > 255) {
|
||||
testCase.setName(testCase.getName().substring(0, 250) + testCase.getName().substring(testCase.getName().length() - 5));
|
||||
}
|
||||
testCase.setNodeId(request.getNodeId());
|
||||
testCase.setNodePath(request.getNodePath());
|
||||
testCase.setOrder(nextOrder += ServiceUtils.ORDER_STEP);
|
||||
|
|
|
@ -98,28 +98,6 @@
|
|||
|
||||
<test-case-edit-other-info :read-only="readOnly" :project-id="projectIds" :form="form"
|
||||
:label-width="formLabelWidth" :case-id="form.id" ref="otherInfo"/>
|
||||
|
||||
<el-row style="margin-top: 10px" v-if="type!=='add'">
|
||||
<el-col :span="20" :offset="1">{{ $t('test_track.review.comment') }}:
|
||||
<el-button icon="el-icon-plus" type="mini" @click="openComment" :disabled="readOnly"></el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-if="type!=='add'">
|
||||
<el-col :span="20" :offset="1">
|
||||
|
||||
<review-comment-item v-for="(comment,index) in comments"
|
||||
:key="index"
|
||||
:comment="comment"
|
||||
@refresh="getComments" :disabled="readOnly" api-url="/test/case"/>
|
||||
<div v-if="comments.length === 0" style="text-align: center">
|
||||
<i class="el-icon-chat-line-square" style="font-size: 15px;color: #8a8b8d;">
|
||||
<span style="font-size: 15px; color: #8a8b8d;">
|
||||
{{ $t('test_track.comment.no_comment') }}
|
||||
</span>
|
||||
</i>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<test-case-comment :case-id="form.id"
|
||||
@getComments="getComments" ref="testCaseComment"/>
|
||||
|
||||
|
|
Loading…
Reference in New Issue