From ca1941c7c25e277b1e15d75ec909f4769b48259d Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Fri, 23 Apr 2021 16:57:33 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E7=BC=BA=E9=99=B7=E7=AE=A1=E7=90=86):?= =?UTF-8?q?=20=E5=88=9B=E5=BB=BA=E7=BC=BA=E9=99=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../track/controller/IssuesController.java | 18 ++-- .../track/issue/AbstractIssuePlatform.java | 2 + .../metersphere/track/issue/JiraPlatform.java | 9 +- .../track/issue/LocalPlatform.java | 5 + .../metersphere/track/issue/TapdPlatform.java | 27 ++++-- .../track/issue/ZentaoPlatform.java | 26 ++++-- .../track/service/IssuesService.java | 92 +++++++++++-------- .../common/components/MsTableHeader.vue | 8 +- .../workspace/template/IssuesTemplateList.vue | 6 +- .../case/components/TestCaseIssueRelate.vue | 2 +- .../track/issue/IssueEditDetail.vue | 74 +++++++-------- .../components/track/issue/IssueList.vue | 17 +++- frontend/src/common/js/table-constants.js | 7 +- frontend/src/i18n/en-US.js | 6 +- frontend/src/i18n/zh-CN.js | 6 +- frontend/src/i18n/zh-TW.js | 6 +- 16 files changed, 181 insertions(+), 130 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 54cd2c377c..22f1b6cf33 100644 --- a/backend/src/main/java/io/metersphere/track/controller/IssuesController.java +++ b/backend/src/main/java/io/metersphere/track/controller/IssuesController.java @@ -64,19 +64,19 @@ public class IssuesController { issuesService.delete(id); } - @GetMapping("/tapd/user/{caseId}") - public List getTapdUsers(@PathVariable String caseId) { - return issuesService.getTapdProjectUsers(caseId); + @PostMapping("/tapd/user") + public List getTapdUsers(@RequestBody IssuesRequest request) { + return issuesService.getTapdProjectUsers(request); } - @GetMapping("/zentao/user/{caseId}") - public List getZentaoUsers(@PathVariable String caseId) { - return issuesService.getZentaoUsers(caseId); + @PostMapping("/zentao/user") + public List getZentaoUsers(@RequestBody IssuesRequest request) { + return issuesService.getZentaoUsers(request); } - @GetMapping("/zentao/builds/{caseId}") - public List getZentaoBuilds(@PathVariable String caseId) { - return issuesService.getZentaoBuilds(caseId); + @PostMapping("/zentao/builds") + public List getZentaoBuilds(@RequestBody IssuesRequest request) { + return issuesService.getZentaoBuilds(request); } diff --git a/backend/src/main/java/io/metersphere/track/issue/AbstractIssuePlatform.java b/backend/src/main/java/io/metersphere/track/issue/AbstractIssuePlatform.java index 6b7a6de183..085dfffa05 100644 --- a/backend/src/main/java/io/metersphere/track/issue/AbstractIssuePlatform.java +++ b/backend/src/main/java/io/metersphere/track/issue/AbstractIssuePlatform.java @@ -45,6 +45,7 @@ public abstract class AbstractIssuePlatform implements IssuesPlatform { protected RestTemplate restTemplateIgnoreSSL; protected String testCaseId; + protected String projectId; protected String key; public String getKey() { @@ -78,6 +79,7 @@ public abstract class AbstractIssuePlatform implements IssuesPlatform { this.issuesMapper = CommonBeanFactory.getBean(IssuesMapper.class); this.extIssuesMapper = CommonBeanFactory.getBean(ExtIssuesMapper.class); this.testCaseId = issuesRequest.getTestCaseId(); + this.projectId = issuesRequest.getProjectId(); // this.restTemplateIgnoreSSL = restTemplate; } diff --git a/backend/src/main/java/io/metersphere/track/issue/JiraPlatform.java b/backend/src/main/java/io/metersphere/track/issue/JiraPlatform.java index 0287337ea2..06e3cd4c22 100644 --- a/backend/src/main/java/io/metersphere/track/issue/JiraPlatform.java +++ b/backend/src/main/java/io/metersphere/track/issue/JiraPlatform.java @@ -45,7 +45,12 @@ public class JiraPlatform extends AbstractIssuePlatform { List list = new ArrayList<>(); issuesRequest.setPlatform(IssuesManagePlatform.Jira.toString()); - List issues = extIssuesMapper.getIssuesByCaseId(issuesRequest); + List issues; + if (StringUtils.isNotBlank(issuesRequest.getProjectId())) { + issues = extIssuesMapper.getIssuesByProjectId(issuesRequest); + } else { + issues = extIssuesMapper.getIssuesByCaseId(issuesRequest); + } String config = getPlatformConfig(IssuesManagePlatform.Jira.toString()); JSONObject object = JSON.parseObject(config); @@ -176,7 +181,7 @@ public class JiraPlatform extends AbstractIssuePlatform { } String auth = EncryptUtils.base64Encoding(account + ":" + password); - String jiraKey = getProjectId(null); + String jiraKey = getProjectId(issuesRequest.getProjectId()); if (StringUtils.isBlank(jiraKey)) { diff --git a/backend/src/main/java/io/metersphere/track/issue/LocalPlatform.java b/backend/src/main/java/io/metersphere/track/issue/LocalPlatform.java index fa241c900e..927b9fdaab 100644 --- a/backend/src/main/java/io/metersphere/track/issue/LocalPlatform.java +++ b/backend/src/main/java/io/metersphere/track/issue/LocalPlatform.java @@ -10,6 +10,7 @@ import io.metersphere.track.dto.DemandDTO; import io.metersphere.track.issue.domain.PlatformUser; import io.metersphere.track.request.testcase.IssuesRequest; import io.metersphere.track.request.testcase.IssuesUpdateRequest; +import org.apache.commons.lang3.StringUtils; import java.util.List; import java.util.UUID; @@ -24,7 +25,11 @@ public class LocalPlatform extends AbstractIssuePlatform { @Override public List getIssue(IssuesRequest issuesRequest) { + String projectId = issuesRequest.getProjectId(); issuesRequest.setPlatform(IssuesManagePlatform.Local.toString()); + if (StringUtils.isNotBlank(projectId)) { + return extIssuesMapper.getIssuesByProjectId(issuesRequest); + } return extIssuesMapper.getIssuesByCaseId(issuesRequest); } diff --git a/backend/src/main/java/io/metersphere/track/issue/TapdPlatform.java b/backend/src/main/java/io/metersphere/track/issue/TapdPlatform.java index db593ae54c..ea93beacb9 100644 --- a/backend/src/main/java/io/metersphere/track/issue/TapdPlatform.java +++ b/backend/src/main/java/io/metersphere/track/issue/TapdPlatform.java @@ -38,13 +38,18 @@ public class TapdPlatform extends AbstractIssuePlatform { @Override public List getIssue(IssuesRequest issuesRequest) { List list = new ArrayList<>(); - String tapdId = getProjectId(""); + String tapdId = getProjectId(issuesRequest.getProjectId()); - TestCaseIssuesExample example = new TestCaseIssuesExample(); - example.createCriteria().andTestCaseIdEqualTo(testCaseId); +// TestCaseIssuesExample example = new TestCaseIssuesExample(); +// example.createCriteria().andTestCaseIdEqualTo(testCaseId); issuesRequest.setPlatform(IssuesManagePlatform.Tapd.toString()); - List issues = extIssuesMapper.getIssuesByCaseId(issuesRequest); + List issues; + if (StringUtils.isNotBlank(issuesRequest.getProjectId())) { + issues = extIssuesMapper.getIssuesByProjectId(issuesRequest); + } else { + issues = extIssuesMapper.getIssuesByCaseId(issuesRequest); + } List issuesIds = issues.stream().map(Issues::getId).collect(Collectors.toList()); issuesIds.forEach(issuesId -> { @@ -52,9 +57,11 @@ public class TapdPlatform extends AbstractIssuePlatform { if (StringUtils.isBlank(dto.getId())) { // 缺陷不存在,解除用例和缺陷的关联 TestCaseIssuesExample issuesExample = new TestCaseIssuesExample(); - issuesExample.createCriteria() - .andTestCaseIdEqualTo(testCaseId) - .andIssuesIdEqualTo(issuesId); + TestCaseIssuesExample.Criteria criteria = issuesExample.createCriteria(); + if (StringUtils.isNotBlank(testCaseId)) { + criteria.andTestCaseIdEqualTo(testCaseId); + } + criteria.andIssuesIdEqualTo(issuesId); testCaseIssuesMapper.deleteByExample(issuesExample); issuesMapper.deleteByPrimaryKey(issuesId); } else { @@ -144,7 +151,7 @@ public class TapdPlatform extends AbstractIssuePlatform { String url = "https://api.tapd.cn/bugs"; String testCaseId = issuesRequest.getTestCaseId(); - String tapdId = getProjectId(""); + String tapdId = getProjectId(issuesRequest.getProjectId()); if (StringUtils.isBlank(tapdId)) { MSException.throwException("未关联Tapd 项目ID"); @@ -206,8 +213,8 @@ public class TapdPlatform extends AbstractIssuePlatform { @Override public List getPlatformUser() { List users = new ArrayList<>(); - String projectId = getProjectId(""); - String url = "https://api.tapd.cn/workspaces/users?workspace_id=" + projectId; + String id = getProjectId(projectId); + String url = "https://api.tapd.cn/workspaces/users?workspace_id=" + id; ResultHolder call = call(url); String listJson = JSON.toJSONString(call.getData()); JSONArray jsonArray = JSON.parseArray(listJson); diff --git a/backend/src/main/java/io/metersphere/track/issue/ZentaoPlatform.java b/backend/src/main/java/io/metersphere/track/issue/ZentaoPlatform.java index 47a10632c9..69dbdb443d 100644 --- a/backend/src/main/java/io/metersphere/track/issue/ZentaoPlatform.java +++ b/backend/src/main/java/io/metersphere/track/issue/ZentaoPlatform.java @@ -65,12 +65,18 @@ public class ZentaoPlatform extends AbstractIssuePlatform { public List getIssue(IssuesRequest issuesRequest) { List list = new ArrayList<>(); - TestCaseIssuesExample example = new TestCaseIssuesExample(); - example.createCriteria().andTestCaseIdEqualTo(testCaseId); +// TestCaseIssuesExample example = new TestCaseIssuesExample(); +// example.createCriteria().andTestCaseIdEqualTo(testCaseId); issuesRequest.setPlatform(IssuesManagePlatform.Zentao.toString()); - List issues = extIssuesMapper.getIssuesByCaseId(issuesRequest); + + List issues; + if (StringUtils.isNotBlank(issuesRequest.getProjectId())) { + issues = extIssuesMapper.getIssuesByProjectId(issuesRequest); + } else { + issues = extIssuesMapper.getIssuesByCaseId(issuesRequest); + } List issuesIds = issues.stream().map(Issues::getId).collect(Collectors.toList()); issuesIds.forEach(issuesId -> { @@ -78,9 +84,11 @@ public class ZentaoPlatform extends AbstractIssuePlatform { if (StringUtils.isBlank(dto.getId())) { // 缺陷不存在,解除用例和缺陷的关联 TestCaseIssuesExample issuesExample = new TestCaseIssuesExample(); - issuesExample.createCriteria() - .andTestCaseIdEqualTo(testCaseId) - .andIssuesIdEqualTo(issuesId); + TestCaseIssuesExample.Criteria criteria = issuesExample.createCriteria(); + if (StringUtils.isNotBlank(testCaseId)) { + criteria.andTestCaseIdEqualTo(testCaseId); + } + criteria.andIssuesIdEqualTo(issuesId); testCaseIssuesMapper.deleteByExample(issuesExample); issuesMapper.deleteByPrimaryKey(issuesId); } else { @@ -193,7 +201,7 @@ public class ZentaoPlatform extends AbstractIssuePlatform { issuesRequest.setPlatform(IssuesManagePlatform.Zentao.toString()); String session = login(); - String projectId = getProjectId(null); + String projectId = getProjectId(issuesRequest.getProjectId()); if (StringUtils.isBlank(projectId)) { MSException.throwException("add zentao bug fail, project zentao id is null"); @@ -338,12 +346,12 @@ public class ZentaoPlatform extends AbstractIssuePlatform { public List getBuilds() { String session = login(); - String projectId = getProjectId(null); + String projectId1 = getProjectId(projectId); HttpHeaders httpHeaders = new HttpHeaders(); HttpEntity requestEntity = new HttpEntity<>(httpHeaders); RestTemplate restTemplate = new RestTemplate(); ResponseEntity responseEntity = restTemplate.exchange(url + "api-getModel-build-getProductBuildPairs-productID={projectId}?zentaosid=" + session, - HttpMethod.GET, requestEntity, String.class, projectId); + HttpMethod.GET, requestEntity, String.class, projectId1); String body = responseEntity.getBody(); JSONObject obj = JSONObject.parseObject(body); 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 1afdab5c94..cae18d053d 100644 --- a/backend/src/main/java/io/metersphere/track/service/IssuesService.java +++ b/backend/src/main/java/io/metersphere/track/service/IssuesService.java @@ -1,11 +1,12 @@ package io.metersphere.track.service; import io.metersphere.base.domain.*; +import io.metersphere.base.mapper.IssueTemplateMapper; import io.metersphere.base.mapper.IssuesMapper; import io.metersphere.base.mapper.TestCaseIssuesMapper; -import io.metersphere.base.mapper.ext.ExtIssuesMapper; import io.metersphere.commons.constants.IssuesManagePlatform; import io.metersphere.commons.constants.NoticeConstants; +import io.metersphere.commons.exception.MSException; import io.metersphere.commons.user.SessionUser; import io.metersphere.commons.utils.ServiceUtils; import io.metersphere.commons.utils.SessionUtils; @@ -24,16 +25,12 @@ import io.metersphere.track.request.testcase.IssuesRequest; import io.metersphere.track.request.testcase.IssuesUpdateRequest; import org.apache.commons.collections.CollectionUtils; import org.apache.commons.lang3.StringUtils; -import org.apache.ibatis.session.SqlSessionFactory; import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import java.util.*; @Service @Transactional(rollbackFor = Exception.class) @@ -53,9 +50,7 @@ public class IssuesService { @Resource private TestCaseIssuesMapper testCaseIssuesMapper; @Resource - private SqlSessionFactory sqlSessionFactory; - @Resource - private ExtIssuesMapper extIssuesMapper; + private IssueTemplateMapper issueTemplateMapper; public void testAuth(String platform) { AbstractIssuePlatform abstractPlatform = IssueFactory.createPlatform(platform, new IssuesRequest()); @@ -100,13 +95,15 @@ public class IssuesService { } public List getUpdatePlatforms(IssuesUpdateRequest updateRequest) { - List platforms = null; + List platforms = new ArrayList<>(); if (StringUtils.isNotBlank(updateRequest.getTestCaseId())) { // 测试计划关联 - platforms = getPlatformsByCaseId(updateRequest.getTestCaseId()); + String p = getPlatformsByCaseId(updateRequest.getTestCaseId()); + platforms.add(p); } else { // 缺陷管理关联 - platforms = getPlatformsByProjectId(updateRequest.getProjectId()); + String t = getIssueTemplate(updateRequest.getProjectId()); + platforms.add(t); } if (CollectionUtils.isEmpty(platforms)) { @@ -137,16 +134,24 @@ public class IssuesService { return list; } - public List getPlatformsByProjectId(String projectId) { - return getPlatforms(projectService.getProjectById(projectId)); - } - - public List getPlatformsByCaseId(String caseId) { + public String getPlatformsByCaseId(String caseId) { TestCaseWithBLOBs testCase = testCaseService.getTestCase(caseId); Project project = projectService.getProjectById(testCase.getProjectId()); - List platforms = getPlatforms(project); - platforms.add("LOCAL"); - return getPlatforms(project); + return getIssueTemplate(project.getId()); + } + + public String getIssueTemplate(String projectId) { + Project project = projectService.getProjectById(projectId); + String id = project.getIssueTemplateId(); + if (StringUtils.isBlank(id)) { + MSException.throwException("project issue template id is null."); + } + IssueTemplate issueTemplate = issueTemplateMapper.selectByPrimaryKey(id); + String platform = issueTemplate.getPlatform(); + if (StringUtils.equals(platform, "metersphere")) { + return IssuesManagePlatform.Local.name(); + } + return platform; } public List getPlatforms(Project project) { @@ -224,17 +229,13 @@ public class IssuesService { issuesMapper.updateByPrimaryKeySelective(issues); } - public List getTapdProjectUsers(String caseId) { - IssuesRequest issueRequest = new IssuesRequest(); - issueRequest.setTestCaseId(caseId); - AbstractIssuePlatform platform = IssueFactory.createPlatform(IssuesManagePlatform.Tapd.name(), issueRequest); + public List getTapdProjectUsers(IssuesRequest request) { + AbstractIssuePlatform platform = IssueFactory.createPlatform(IssuesManagePlatform.Tapd.name(), request); return platform.getPlatformUser(); } - public List getZentaoUsers(String caseId) { - IssuesRequest issueRequest = new IssuesRequest(); - issueRequest.setTestCaseId(caseId); - AbstractIssuePlatform platform = IssueFactory.createPlatform(IssuesManagePlatform.Zentao.name(), issueRequest); + public List getZentaoUsers(IssuesRequest request) { + AbstractIssuePlatform platform = IssueFactory.createPlatform(IssuesManagePlatform.Zentao.name(), request); return platform.getPlatformUser(); } @@ -264,23 +265,36 @@ public class IssuesService { return context; } - public List getZentaoBuilds(String caseId) { - IssuesRequest issueRequest = new IssuesRequest(); - issueRequest.setTestCaseId(caseId); - ZentaoPlatform platform = (ZentaoPlatform) IssueFactory.createPlatform(IssuesManagePlatform.Zentao.name(), issueRequest); + public List getZentaoBuilds(IssuesRequest request) { + ZentaoPlatform platform = (ZentaoPlatform) IssueFactory.createPlatform(IssuesManagePlatform.Zentao.name(), request); return platform.getBuilds(); } public List list(IssuesRequest request) { request.setOrders(ServiceUtils.getDefaultOrder(request.getOrders())); - List issues = extIssuesMapper.getIssuesByProjectId(request); - Map> issueMap = getIssueMap(issues); - Map platformMap = getPlatformMap(request); - issueMap.forEach((platformName, data) -> { - AbstractIssuePlatform platform = platformMap.get(platformName); - platform.filter(data); + + + List list = new ArrayList<>(); + String projectId = request.getProjectId(); + Project project = projectService.getProjectById(projectId); + List platforms = getPlatforms(project); + platforms.add(IssuesManagePlatform.Local.toString()); + List platformList = IssueFactory.createPlatforms(platforms, request); + platformList.forEach(platform -> { + List issue = platform.getIssue(request); + list.addAll(issue); }); - return issues; +// List issues = extIssuesMapper.getIssuesByProjectId(request); +// Map> issueMap = getIssueMap(issues); +// Map platformMap = getPlatformMap(request); +// issueMap.forEach((platformName, data) -> { +// AbstractIssuePlatform platform = platformMap.get(platformName); +// if (platform != null) { +// platform.filter(data); +// } +// }); +// return issues; + return list; } public Map> getIssueMap(List issues) { diff --git a/frontend/src/business/components/common/components/MsTableHeader.vue b/frontend/src/business/components/common/components/MsTableHeader.vue index c99fb1b51a..e145a4c693 100644 --- a/frontend/src/business/components/common/components/MsTableHeader.vue +++ b/frontend/src/business/components/common/components/MsTableHeader.vue @@ -22,7 +22,7 @@ - + @@ -86,6 +86,12 @@ default() { return this.$t('commons.search_by_name'); } + }, + haveSearch: { + Boolean, + default() { + return true; + } } }, methods: { diff --git a/frontend/src/business/components/settings/workspace/template/IssuesTemplateList.vue b/frontend/src/business/components/settings/workspace/template/IssuesTemplateList.vue index 3e16b3caa5..7f407b9407 100644 --- a/frontend/src/business/components/settings/workspace/template/IssuesTemplateList.vue +++ b/frontend/src/business/components/settings/workspace/template/IssuesTemplateList.vue @@ -3,7 +3,7 @@ diff --git a/frontend/src/business/components/track/issue/IssueEditDetail.vue b/frontend/src/business/components/track/issue/IssueEditDetail.vue index b534698c71..fbc8724131 100644 --- a/frontend/src/business/components/track/issue/IssueEditDetail.vue +++ b/frontend/src/business/components/track/issue/IssueEditDetail.vue @@ -7,6 +7,21 @@ + + + + + + + + + + + + + @@ -37,23 +52,9 @@ - - - - - - - - - - - - - - + @@ -108,7 +109,7 @@ export default { }, testCaseContainIds: new Set(), url: '', - form:{ + form: { title: '', description: '' }, @@ -145,32 +146,27 @@ export default { getTemplate('field/template/issue/get/relate/', this) .then((template) => { this.issueTemplate = template; + this.getThirdPartyInfo(); initAddFuc(data); }); }, getThirdPartyInfo() { - let url = '/project/get/' + this.projectId; - if (this.isPlan) { - url = '/test/case/project/' + this.caseId; + let platform = this.issueTemplate.platform; + if (platform === 'Zentao') { + this.hasZentaoId = true; + this.result = this.$post("/issues/zentao/builds", {projectId: this.projectId}, response => { + this.Builds = response.data; + }); + this.result = this.$post("/issues/zentao/user", {projectId: this.projectId}, response => { + this.zentaoUsers = response.data; + }); + } + if (platform === 'Tapd') { + this.hasTapdId = true; + this.result = this.$post("/issues/tapd/user", {projectId: this.projectId}, (response) => { + this.tapdUsers = response.data; + }); } - this.$get(url, res => { - let project = res.data; - if (project.tapdId) { - this.hasTapdId = true; - this.result = this.$get("/issues/tapd/user/" + this.caseId, (response) => { - this.tapdUsers = response.data; - }); - } - if (project.zentaoId) { - this.hasZentaoId = true; - this.result = this.$get("/issues/zentao/builds/" + this.caseId,response => { - this.Builds = response.data; - }); - this.result = this.$get("/issues/zentao/user/" + this.caseId, response => { - this.zentaoUsers = response.data; - }); - } - }) }, initEdit(data) { this.testCaseContainIds = new Set(); @@ -243,7 +239,7 @@ export default { }); }, parseOldFields(param) { - let customFieldsStr = param.customFields; + let customFieldsStr = param.customFields; if (customFieldsStr) { let customFields = JSON.parse(customFieldsStr); if (customFields['i43sf4_issueStatus']) { diff --git a/frontend/src/business/components/track/issue/IssueList.vue b/frontend/src/business/components/track/issue/IssueList.vue index 99ae420567..73c274b860 100644 --- a/frontend/src/business/components/track/issue/IssueList.vue +++ b/frontend/src/business/components/track/issue/IssueList.vue @@ -4,7 +4,7 @@ @@ -87,15 +87,16 @@ export default { operators: [ { tip: this.$t('commons.edit'), icon: "el-icon-edit", - exec: this.handleEdit + exec: this.handleEdit, + isDisable: this.btnDisable }, { tip: this.$t('commons.copy'), icon: "el-icon-copy-document", type: "success", exec: this.handleCopy, - isDisable: this.systemDisable + isDisable: this.btnDisable }, { tip: this.$t('commons.delete'), icon: "el-icon-delete", type: "danger", exec: this.handleDelete, - isDisable: this.systemDisable + isDisable: this.btnDisable } ], }; @@ -152,6 +153,12 @@ export default { this.getIssues(); }); }, + btnDisable(row) { + if (row.platform === 'Local') { + return false; + } + return true; + } } }; diff --git a/frontend/src/common/js/table-constants.js b/frontend/src/common/js/table-constants.js index d9fdd78b41..1c519efc05 100644 --- a/frontend/src/common/js/table-constants.js +++ b/frontend/src/common/js/table-constants.js @@ -24,9 +24,9 @@ export const CASE_TYPE_OPTION = [ export const ISSUE_PLATFORM_OPTION = [ {value: 'metersphere',text: 'Metersphere'}, - {value: 'jira',text: 'JIRA'}, + {value: 'Jira',text: 'JIRA'}, {value: 'Tapd',text: 'Tapd'}, - {value: 'zentao',text: '禅道'}, + {value: 'Zentao',text: '禅道'}, ]; export const FIELD_TYPE_MAP = { @@ -64,5 +64,6 @@ export const SYSTEM_FIELD_NAME_MAP = { export const ISSUE_STATUS_MAP = { 'new': '新建', 'closed': '已关闭', - 'resolved': '已解决' + 'resolved': '已解决', + 'active': '激活' } diff --git a/frontend/src/i18n/en-US.js b/frontend/src/i18n/en-US.js index 85a4486e93..ef4abdb268 100644 --- a/frontend/src/i18n/en-US.js +++ b/frontend/src/i18n/en-US.js @@ -1480,9 +1480,9 @@ export default { close_success: "Closed successfully", preview: "Preview", please_choose_current_owner: "Please choose current owner", - tapd_current_owner: "Tapd Current Owner:", - zentao_bug_build: "Zentao bug Impact version", - zentao_bug_assigned: "Zentao bug handler", + tapd_current_owner: "Tapd Current Owner", + zentao_bug_build: "Zentao Impact version", + zentao_bug_assigned: "Zentao handler", }, report: { name: "Test Plan Report", diff --git a/frontend/src/i18n/zh-CN.js b/frontend/src/i18n/zh-CN.js index 5648fe9aa3..3569d18826 100644 --- a/frontend/src/i18n/zh-CN.js +++ b/frontend/src/i18n/zh-CN.js @@ -1498,9 +1498,9 @@ export default { status_resolved: '已解决', status_closed: '已关闭', please_choose_current_owner: "请选择处理人", - tapd_current_owner: "Tapd bug 处理人:", - zentao_bug_build: "禅道 bug 影响版本", - zentao_bug_assigned: "禅道 bug 处理人", + tapd_current_owner: "Tapd 处理人", + zentao_bug_build: "禅道 影响版本", + zentao_bug_assigned: "禅道 处理人", }, report: { name: "测试计划报告", diff --git a/frontend/src/i18n/zh-TW.js b/frontend/src/i18n/zh-TW.js index 6b06f17a68..a8a1738786 100644 --- a/frontend/src/i18n/zh-TW.js +++ b/frontend/src/i18n/zh-TW.js @@ -1482,9 +1482,9 @@ export default { close_success: "關閉成功", preview: "預覽", please_choose_current_owner: "請選擇處理人", - tapd_current_owner: "Tapd bug 處理人:", - zentao_bug_build: "禪道 bug 影響版本", - zentao_bug_assigned: "禪道 bug 處理人", + tapd_current_owner: "Tapd 處理人", + zentao_bug_build: "禪道 影響版本", + zentao_bug_assigned: "禪道 處理人", }, report: { name: "測試計畫包括",