fix: jira同步缺陷出现重复用例

--bug=1009575 --user=陈建星 【测试跟踪】jira平台缺陷同步会出现重复缺陷,并且在ms里删除缺陷会同时删掉jira里的缺陷 https://www.tapd.cn/55049933/s/1091677
This commit is contained in:
chenjianxing 2022-01-14 10:28:23 +08:00 committed by zhangdahai112
parent 39cccc782b
commit 3313583e64
2 changed files with 9 additions and 2 deletions

View File

@ -11,6 +11,7 @@ import org.springframework.core.io.FileSystemResource;
import org.springframework.http.*;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
import org.springframework.web.client.HttpClientErrorException;
import java.io.File;
import java.util.List;
@ -110,7 +111,13 @@ public abstract class JiraAbstractClient extends BaseClient {
public void deleteIssue(String id) {
LogUtil.info("deleteIssue: " + id);
restTemplate.exchange(getBaseUrl() + "/issue/" + id, HttpMethod.DELETE, getAuthHttpEntity(), String.class);
try {
restTemplate.exchange(getBaseUrl() + "/issue/" + id, HttpMethod.DELETE, getAuthHttpEntity(), String.class);
} catch (HttpClientErrorException e) {
if (e.getRawStatusCode() != 404) {// 404说明jira没有可以直接删
MSException.throwException(e.getMessage());
}
}
}

@ -1 +1 @@
Subproject commit cbcdbbbd9395fb54256fc91182ef90b76f1d0bfc
Subproject commit b35dfb7f4571ed9e9496ff67339b9118232b4bbd