From 15d1ae7fbf830a672ff332335ad6a069b6634ae8 Mon Sep 17 00:00:00 2001 From: WangXu10 Date: Thu, 13 Jul 2023 10:16:30 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):=20?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E7=94=A8=E4=BE=8B=E5=88=9B=E5=BB=BA=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E5=88=86=E6=94=AF,=20=E6=8A=A5=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E7=94=A8=E4=BE=8B=E5=B7=B2=E5=AD=98=E5=9C=A8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1027596 --user=王旭 【测试跟踪】功能用例-创建分支版本-报错该模块下已存在该功能用例 https://www.tapd.cn/55049933/s/1392461 --- .../main/java/io/metersphere/service/TestCaseService.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test-track/backend/src/main/java/io/metersphere/service/TestCaseService.java b/test-track/backend/src/main/java/io/metersphere/service/TestCaseService.java index f0b9aa0f5f..d96dd26205 100644 --- a/test-track/backend/src/main/java/io/metersphere/service/TestCaseService.java +++ b/test-track/backend/src/main/java/io/metersphere/service/TestCaseService.java @@ -635,6 +635,11 @@ public class TestCaseService { if (StringUtils.isNotBlank(testCase.getTestId())) { criteria.andTestIdEqualTo(testCase.getTestId()); } + + if (StringUtils.isNotBlank(testCase.getVersionId())) { + criteria.andVersionIdEqualTo(testCase.getVersionId()); + } + if (isEdit && StringUtils.isNotBlank(testCase.getId())) { criteria.andIdNotEqualTo(testCase.getId()); }