From a215a418b2f78b12e8e8b68f3d0f8993cdc5e617 Mon Sep 17 00:00:00 2001 From: metersphere-bot <78466014+metersphere-bot@users.noreply.github.com> Date: Thu, 1 Jul 2021 15:32:14 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=BC=BA=E9=99=B7=E5=B9=B3=E5=8F=B0?= =?UTF-8?q?=E6=A0=A1=E9=AA=8C=E6=8A=A5=E9=94=99=20(#4251)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: chenjianxing --bug=1004724 --user=陈建星 【服务集成】第三方缺陷平台,测试连接失败 https://www.tapd.cn/55049933/s/1023875 --- .../track/controller/IssuesController.java | 6 ++--- .../track/service/IssuesService.java | 6 +++-- .../organization/components/JiraSetting.vue | 4 ++-- .../organization/components/TapdSetting.vue | 4 ++-- .../organization/components/ZentaoSetting.vue | 4 ++-- .../settings/project/ProjectList.vue | 21 +++++++++-------- .../settings/workspace/MsProject.vue | 23 ++++++++++--------- 7 files changed, 36 insertions(+), 32 deletions(-) diff --git a/backend/src/main/java/io/metersphere/track/controller/IssuesController.java b/backend/src/main/java/io/metersphere/track/controller/IssuesController.java index 2adb52ac7b..6c523a20f9 100644 --- a/backend/src/main/java/io/metersphere/track/controller/IssuesController.java +++ b/backend/src/main/java/io/metersphere/track/controller/IssuesController.java @@ -54,9 +54,9 @@ public class IssuesController { return issuesService.getIssues(id); } - @GetMapping("/auth/{platform}") - public void testAuth(@PathVariable String platform) { - issuesService.testAuth(platform); + @GetMapping("/auth/{orgId}/{platform}") + public void testAuth(@PathVariable String orgId, @PathVariable String platform) { + issuesService.testAuth(orgId, platform); } @GetMapping("/close/{id}") 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 8b9352ee2a..c2407b72a4 100644 --- a/backend/src/main/java/io/metersphere/track/service/IssuesService.java +++ b/backend/src/main/java/io/metersphere/track/service/IssuesService.java @@ -72,8 +72,10 @@ public class IssuesService { @Resource private TestCaseMapper testCaseMapper; - public void testAuth(String platform) { - AbstractIssuePlatform abstractPlatform = IssueFactory.createPlatform(platform, new IssuesRequest()); + public void testAuth(String orgId, String platform) { + IssuesRequest issuesRequest = new IssuesRequest(); + issuesRequest.setOrganizationId(orgId); + AbstractIssuePlatform abstractPlatform = IssueFactory.createPlatform(platform, issuesRequest); abstractPlatform.testAuth(); } diff --git a/frontend/src/business/components/settings/organization/components/JiraSetting.vue b/frontend/src/business/components/settings/organization/components/JiraSetting.vue index a167e16cb6..39b838bbfe 100644 --- a/frontend/src/business/components/settings/organization/components/JiraSetting.vue +++ b/frontend/src/business/components/settings/organization/components/JiraSetting.vue @@ -58,7 +58,7 @@