From f580d8e2a404dd149305daa8e623a2d9c841a557 Mon Sep 17 00:00:00 2001 From: song-cc-rock Date: Tue, 15 Aug 2023 14:34:58 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):=20?= =?UTF-8?q?=E7=BC=BA=E9=99=B7=E5=A4=8D=E5=88=B6=E5=90=8E=E4=BF=9D=E5=AD=98?= =?UTF-8?q?=E5=88=9B=E5=BB=BA=E4=BA=BA=E6=9C=89=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1028663 --user=宋昌昌 【测试跟踪】github#26143,【测试跟踪-缺陷管理-复制】B用户基于A提交的缺陷复制并修改内容后,B用户提交的缺陷“创建人”显示的是A用户 https://www.tapd.cn/55049933/s/1403791 --- .../io/metersphere/service/issue/platform/LocalPlatform.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test-track/backend/src/main/java/io/metersphere/service/issue/platform/LocalPlatform.java b/test-track/backend/src/main/java/io/metersphere/service/issue/platform/LocalPlatform.java index 32290c0d7c..1c9182cc71 100644 --- a/test-track/backend/src/main/java/io/metersphere/service/issue/platform/LocalPlatform.java +++ b/test-track/backend/src/main/java/io/metersphere/service/issue/platform/LocalPlatform.java @@ -39,12 +39,11 @@ public class LocalPlatform extends LocalAbstractPlatform { List customFields = issuesRequest.getRequestFields(); String customFieldStr = JSON.toJSONString(customFields); List fields = JSON.parseArray(customFieldStr, TestCaseBatchRequest.CustomFiledRequest.class); - for (TestCaseBatchRequest.CustomFiledRequest field : fields) { + for (TestCaseBatchRequest.CustomFiledRequest field : fields) if (StringUtils.equals("状态", field.getName())) { issueStatus = (String) field.getValue(); break; } - } } SessionUser user = SessionUtils.getUser(); String id = UUID.randomUUID().toString(); @@ -58,6 +57,7 @@ public class LocalPlatform extends LocalAbstractPlatform { issues.setUpdateTime(System.currentTimeMillis()); issues.setPlatform(IssuesManagePlatform.Local.toString()); issues.setNum(getNextNum(issuesRequest.getProjectId())); + issues.setCreator(SessionUtils.getUserId()); issuesMapper.insert(issues); issuesRequest.setId(id);