diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/BasePluginService.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/BasePluginService.java index 0ea1cfe851..e12d7b4ffe 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/BasePluginService.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/BasePluginService.java @@ -6,6 +6,7 @@ import io.metersphere.base.mapper.PluginMapper; import io.metersphere.commons.constants.StorageConstants; import io.metersphere.metadata.service.FileManagerService; import io.metersphere.metadata.vo.FileRequest; +import org.apache.commons.collections.CollectionUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -28,6 +29,17 @@ public class BasePluginService { return pluginMapper.selectByExampleWithBLOBs(example); } + public PluginWithBLOBs get(String pluginId) { + return pluginMapper.selectByPrimaryKey(pluginId); + } + + public PluginWithBLOBs getByScripId(String scripId) { + PluginExample example = new PluginExample(); + example.createCriteria().andScriptIdEqualTo(scripId); + List plugins = pluginMapper.selectByExampleWithBLOBs(example); + return CollectionUtils.isEmpty(plugins) ? null : plugins.get(0); + } + public InputStream getPluginResource(String pluginId, String resourceName) { FileRequest request = new FileRequest(); request.setProjectId(DIR_PATH + "/" + pluginId); @@ -38,6 +50,9 @@ public class BasePluginService { public InputStream getPluginJar(String pluginId) { PluginWithBLOBs plugin = pluginMapper.selectByPrimaryKey(pluginId); + if (plugin == null) { + return null; + } return getPluginResource(pluginId, plugin.getSourceName()); } } diff --git a/framework/sdk-parent/xpack-interface/src/main/java/io/metersphere/xpack/track/dto/IssuesDao.java b/framework/sdk-parent/xpack-interface/src/main/java/io/metersphere/xpack/track/dto/IssuesDao.java index f68709c477..44408edc73 100644 --- a/framework/sdk-parent/xpack-interface/src/main/java/io/metersphere/xpack/track/dto/IssuesDao.java +++ b/framework/sdk-parent/xpack-interface/src/main/java/io/metersphere/xpack/track/dto/IssuesDao.java @@ -19,8 +19,6 @@ public class IssuesDao extends IssuesWithBLOBs { private List caseIds; private String caseId; private List tapdUsers; - private ListzentaoBuilds; - private String zentaoAssigned; private String refType; private String refId; private List fields; diff --git a/framework/sdk-parent/xpack-interface/src/main/java/io/metersphere/xpack/track/dto/request/IssuesRequest.java b/framework/sdk-parent/xpack-interface/src/main/java/io/metersphere/xpack/track/dto/request/IssuesRequest.java index cf087cf58a..d4622d04a6 100644 --- a/framework/sdk-parent/xpack-interface/src/main/java/io/metersphere/xpack/track/dto/request/IssuesRequest.java +++ b/framework/sdk-parent/xpack-interface/src/main/java/io/metersphere/xpack/track/dto/request/IssuesRequest.java @@ -21,14 +21,6 @@ public class IssuesRequest extends BaseQueryRequest { * 如果是 PLAN_FUNCTIONAL 则只查询该测试计划用例所关联的缺陷 */ private String refType; - /** - * zentao bug 处理人 - */ - private String zentaoUser; - /** - * zentao bug 影响版本 - */ - private List zentaoBuilds; /** * issues id diff --git a/framework/sdk-parent/xpack-interface/src/main/java/io/metersphere/xpack/track/dto/request/IssuesUpdateRequest.java b/framework/sdk-parent/xpack-interface/src/main/java/io/metersphere/xpack/track/dto/request/IssuesUpdateRequest.java index 6502e6abeb..829eccf2af 100644 --- a/framework/sdk-parent/xpack-interface/src/main/java/io/metersphere/xpack/track/dto/request/IssuesUpdateRequest.java +++ b/framework/sdk-parent/xpack-interface/src/main/java/io/metersphere/xpack/track/dto/request/IssuesUpdateRequest.java @@ -22,15 +22,6 @@ public class IssuesUpdateRequest extends IssuesWithBLOBs { private List addFields; private List editFields; private List requestFields; - /** - * zentao bug 处理人 - */ - private String zentaoUser; - private String zentaoAssigned; - /** - * zentao bug 影响版本 - */ - private List zentaoBuilds; private boolean thirdPartPlatform; private List follows; diff --git a/system-setting/backend/src/main/java/io/metersphere/utils/PluginManagerUtil.java b/system-setting/backend/src/main/java/io/metersphere/utils/PluginManagerUtil.java index 44f63179ad..ff9f5a4fc8 100644 --- a/system-setting/backend/src/main/java/io/metersphere/utils/PluginManagerUtil.java +++ b/system-setting/backend/src/main/java/io/metersphere/utils/PluginManagerUtil.java @@ -55,6 +55,9 @@ public class PluginManagerUtil { * @param pluginManager */ public static void loadPlugin(String id, PluginManager pluginManager, InputStream inputStream) { + if (inputStream == null) { + return; + } if (pluginManager == null) { pluginManager = new PluginManager(); } diff --git a/system-setting/frontend/src/business/workspace/integration/BugManagement.vue b/system-setting/frontend/src/business/workspace/integration/BugManagement.vue index f39e55c234..84e1d50808 100644 --- a/system-setting/frontend/src/business/workspace/integration/BugManagement.vue +++ b/system-setting/frontend/src/business/workspace/integration/BugManagement.vue @@ -31,15 +31,14 @@ - - diff --git a/system-setting/frontend/src/business/workspace/integration/ZentaoSetting.vue b/system-setting/frontend/src/business/workspace/integration/ZentaoSetting.vue deleted file mode 100644 index e298bf01b5..0000000000 --- a/system-setting/frontend/src/business/workspace/integration/ZentaoSetting.vue +++ /dev/null @@ -1,235 +0,0 @@ - - - - - diff --git a/test-track/backend/src/main/java/io/metersphere/base/mapper/ext/ExtIssuesMapper.xml b/test-track/backend/src/main/java/io/metersphere/base/mapper/ext/ExtIssuesMapper.xml index eefc535b2e..f33857437f 100644 --- a/test-track/backend/src/main/java/io/metersphere/base/mapper/ext/ExtIssuesMapper.xml +++ b/test-track/backend/src/main/java/io/metersphere/base/mapper/ext/ExtIssuesMapper.xml @@ -152,7 +152,7 @@ when 'textarea' then cfi.text_value else cfi.value end as value from custom_field_issues cfi - join custom_field cf on cf.id = cfi.field_id + left join custom_field cf on cf.id = cfi.field_id where cfi.resource_id = #{issueId}