refactor(测试跟踪): 优化没有配置缺陷模版的时候不能编辑用例的提示
--bug=1012801 --user=刘瑞斌 【测试跟踪】功能用例-编辑-版本-新建-异常 https://www.tapd.cn/55049933/s/1148943
This commit is contained in:
parent
c0858c674c
commit
3222e861b5
backend/src/main/java/io/metersphere/track
|
@ -0,0 +1,8 @@
|
||||||
|
package io.metersphere.track.issue.service;
|
||||||
|
|
||||||
|
import io.metersphere.track.request.testcase.EditTestCaseRequest;
|
||||||
|
|
||||||
|
public interface XpackIssueService {
|
||||||
|
|
||||||
|
void updateThirdPartyIssuesLink(EditTestCaseRequest testCase);
|
||||||
|
}
|
|
@ -47,6 +47,7 @@ import io.metersphere.track.dto.TestCaseCommentDTO;
|
||||||
import io.metersphere.track.dto.TestCaseDTO;
|
import io.metersphere.track.dto.TestCaseDTO;
|
||||||
import io.metersphere.track.issue.AbstractIssuePlatform;
|
import io.metersphere.track.issue.AbstractIssuePlatform;
|
||||||
import io.metersphere.track.issue.IssueFactory;
|
import io.metersphere.track.issue.IssueFactory;
|
||||||
|
import io.metersphere.track.issue.service.XpackIssueService;
|
||||||
import io.metersphere.track.request.testcase.*;
|
import io.metersphere.track.request.testcase.*;
|
||||||
import io.metersphere.track.request.testplan.LoadCaseRequest;
|
import io.metersphere.track.request.testplan.LoadCaseRequest;
|
||||||
import io.metersphere.xmind.XmindCaseParser;
|
import io.metersphere.xmind.XmindCaseParser;
|
||||||
|
@ -70,7 +71,6 @@ import javax.servlet.http.HttpServletResponse;
|
||||||
import java.io.BufferedInputStream;
|
import java.io.BufferedInputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
import java.lang.reflect.Method;
|
|
||||||
import java.net.URLEncoder;
|
import java.net.URLEncoder;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.concurrent.atomic.AtomicInteger;
|
import java.util.concurrent.atomic.AtomicInteger;
|
||||||
|
@ -352,14 +352,9 @@ public class TestCaseService {
|
||||||
* @param testCase
|
* @param testCase
|
||||||
*/
|
*/
|
||||||
public void updateThirdPartyIssuesLink(EditTestCaseRequest testCase) {
|
public void updateThirdPartyIssuesLink(EditTestCaseRequest testCase) {
|
||||||
try {
|
XpackIssueService issueService = CommonBeanFactory.getBean(XpackIssueService.class);
|
||||||
if (Class.forName("io.metersphere.xpack.issue.service.XpackIssueService") != null) {
|
if (issueService != null) {
|
||||||
Class clazz = Class.forName("io.metersphere.xpack.issue.service.XpackIssueService");
|
issueService.updateThirdPartyIssuesLink(testCase);
|
||||||
Method method = clazz.getMethod("updateThirdPartyIssuesLink", EditTestCaseRequest.class);
|
|
||||||
method.invoke(CommonBeanFactory.getBean("xpackIssueService"), testCase);
|
|
||||||
}
|
|
||||||
} catch (Exception exception) {
|
|
||||||
LogUtil.error("不存在XpackIssueService类");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue