From bd4aca287adaab138507af58b1c6ff35e8f6a1cf Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Thu, 10 Feb 2022 17:59:25 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E7=BC=BA=E9=99=B7?= =?UTF-8?q?=E5=B9=B3=E5=8F=B0=E5=90=8E=E7=BC=BA=E9=99=B7=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E6=8A=A5=E9=94=99=20--bug=3D1010179=20--user=3D=E9=99=88?= =?UTF-8?q?=E5=BB=BA=E6=98=9F=20=E3=80=90=E6=B5=8B=E8=AF=95=E8=B7=9F?= =?UTF-8?q?=E8=B8=AA=E3=80=91-=E7=AC=AC=E4=B8=89=E6=96=B9=E5=B9=B3?= =?UTF-8?q?=E5=8F=B0=E6=94=B9=E4=B8=BAjira=E5=90=8E=EF=BC=8C=E5=9C=A8?= =?UTF-8?q?=E7=BC=BA=E9=99=B7=E7=AE=A1=E7=90=86=E9=A1=B5=E6=8F=90=E7=A4=BA?= =?UTF-8?q?tapd=E9=94=99=E8=AF=AF=E4=BF=A1=E6=81=AF=20https://www.tapd.cn/?= =?UTF-8?q?55049933/s/1102859?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/metersphere/track/service/IssuesService.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/backend/src/main/java/io/metersphere/track/service/IssuesService.java b/backend/src/main/java/io/metersphere/track/service/IssuesService.java index 83919b5a19..627dd79468 100644 --- a/backend/src/main/java/io/metersphere/track/service/IssuesService.java +++ b/backend/src/main/java/io/metersphere/track/service/IssuesService.java @@ -339,6 +339,8 @@ public class IssuesService { Map planMap = testPlans.stream() .collect(Collectors.toMap(TestPlan::getId, TestPlan::getName)); + Project project = projectService.getProjectById(request.getProjectId()); + issues.forEach(item -> { User createUser = userMap.get(item.getCreator()); if (createUser != null) { @@ -355,12 +357,12 @@ public class IssuesService { .collect(Collectors.toList()); item.setCaseIds(caseIds); item.setCaseCount(testCaseIssues.size()); - if (StringUtils.equals(item.getPlatform(), "Tapd")) { + if (IssuesManagePlatform.Tapd.name().equals(project.getPlatform()) && StringUtils.equals(item.getPlatform(), IssuesManagePlatform.Tapd.name())) { TapdPlatform platform = (TapdPlatform) IssueFactory.createPlatform(item.getPlatform(), request); List tapdUsers = platform.getTapdUsers(item.getProjectId(), item.getPlatformId()); item.setTapdUsers(tapdUsers); } - if (StringUtils.equals(item.getPlatform(), "Zentao")) { + if (IssuesManagePlatform.Zentao.name().equals(project.getPlatform()) && StringUtils.equals(item.getPlatform(), IssuesManagePlatform.Zentao.name())) { ZentaoPlatform platform = (ZentaoPlatform) IssueFactory.createPlatform(item.getPlatform(), request); platform.getZentaoAssignedAndBuilds(item); }