fix(测试用例): 用例快捷创建缺陷处理人入参有误

--bug=1042300 --user=宋昌昌 【测试用例】用例详情-缺陷-新建缺陷-选择了处理人-缺陷创建完成后处理人字段显示- https://www.tapd.cn/55049933/s/1530525
This commit is contained in:
song-cc-rock 2024-06-18 11:57:22 +08:00 committed by Craftsman
parent c0eb21dc22
commit 4c4fed22d7
2 changed files with 10 additions and 3 deletions

View File

@ -15,6 +15,7 @@ import io.metersphere.sdk.util.LogUtils;
import io.metersphere.system.uid.IDGenerator;
import jakarta.annotation.Resource;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.collections4.MapUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.data.redis.core.ListOperations;
import org.springframework.data.redis.core.RedisTemplate;
@ -278,7 +279,9 @@ public class TestPlanExecuteService {
this.setRedisForList(genQueueKey(queueId, queueType), childrenQueue.stream().map(JSON::toJSONString).toList());
// 更新报告的执行时间
extTestPlanReportMapper.batchUpdateExecuteTimeAndStatus(System.currentTimeMillis(), reportMap.values().stream().toList());
if (MapUtils.isNotEmpty(reportMap)) {
extTestPlanReportMapper.batchUpdateExecuteTimeAndStatus(System.currentTimeMillis(), reportMap.values().stream().toList());
}
if (StringUtils.equalsIgnoreCase(executionQueue.getRunMode(), ApiBatchRunMode.SERIAL.name())) {
//串行
@ -296,7 +299,9 @@ public class TestPlanExecuteService {
} else {
Map<String, String> reportMap = testPlanReportService.genReportByExecution(executionQueue.getPrepareReportId(), genReportRequest, executionQueue.getCreateUser());
executionQueue.setPrepareReportId(reportMap.get(executionQueue.getSourceID()));
extTestPlanReportMapper.batchUpdateExecuteTimeAndStatus(System.currentTimeMillis(), reportMap.values().stream().toList());
if (MapUtils.isNotEmpty(reportMap)) {
extTestPlanReportMapper.batchUpdateExecuteTimeAndStatus(System.currentTimeMillis(), reportMap.values().stream().toList());
}
this.executeTestPlan(executionQueue);
return executionQueue.getPrepareReportId();
}

View File

@ -125,10 +125,11 @@
if (!errors) {
drawerLoading.value = true;
templateCustomFields.value.forEach((item: any) => {
if (item.id === 'current_owner') {
if (item.key === 'handleUser') {
item.value = form.value.handleUserId;
}
});
delete form.value.handleUserId;
try {
await createOrUpdateBug({
request: { ...form.value, customFields: templateCustomFields.value, ...props.extraParams },
@ -167,6 +168,7 @@
templateCustomFields.value = result.customFields.map((item: any) => {
return {
id: item.fieldId,
key: item.fieldKey,
name: item.fieldName,
type: item.type,
value: (Array.isArray(item.defaultValue) ? JSON.stringify(item.defaultValue) : item.defaultValue) || '',