From 46fda9c1a0d56b16ef1215fb0e14ad25581ae5b4 Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Mon, 11 Apr 2022 18:11:14 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):=20?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E9=A1=B9=E7=9B=AE=E7=94=A8=E4=BE=8B=E6=A8=A1?= =?UTF-8?q?=E7=89=88=EF=BC=8C=E6=96=B0=E5=A2=9E=E8=87=AA=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E6=9C=AA=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1012082 --user=李玉号 【测试跟踪】-github#12441 默认项目用例模版/缺陷模版。新增自定义字段 未显示 https://www.tapd.cn/55049933/s/1132582 Closes #12441 --- .../base/mapper/ext/ExtProjectMapper.java | 2 ++ .../base/mapper/ext/ExtProjectMapper.xml | 5 +++++ .../io/metersphere/service/ProjectService.java | 8 +------- .../db/migration/V113__v1.19.3_release.sql | 16 ++++++++++++++++ 4 files changed, 24 insertions(+), 7 deletions(-) diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtProjectMapper.java b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtProjectMapper.java index 731c4fb463..513592e81e 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtProjectMapper.java +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtProjectMapper.java @@ -39,4 +39,6 @@ public interface ExtProjectMapper { void setDefaultMessageTask(@Param("projectId") String projectId); List queryListByIds(@Param("ids") List ids); + + void updateUseDefaultCaseTemplateProject(@Param("originId") String originId,@Param("templateId") String templateId,@Param("projectId") String projectId); } diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtProjectMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtProjectMapper.xml index 2e9addc5d6..a7d6181e4a 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtProjectMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtProjectMapper.xml @@ -173,6 +173,11 @@ FROM project WHERE workspace_id = #{workspaceId}) AS a) + + update project set case_template_id = #{templateId} + where (case_template_id = #{originId} or case_template_id is null or case_template_id = '') + and id = #{projectId} +