fix(缺陷管理): 提交到禅道缺陷里面的图片不正确的问题

--bug=1010615 --user=李玉号 【缺陷管理】-github#10586集成禅道后无法同步禅道缺陷里面的图片
https://www.tapd.cn/55049933/s/1113039

Closes #10586
Closes #10473
This commit is contained in:
shiziyuan9527 2022-03-03 15:32:32 +08:00 committed by 刘瑞斌
parent 6f8e4ef7bd
commit 2c240ac576
1 changed files with 4 additions and 2 deletions

View File

@ -392,10 +392,12 @@ public class ZentaoPlatform extends AbstractIssuePlatform {
String id = uploadFile(mdImage.getBody());
// todo delete local file
int index = fileName.lastIndexOf(".");
String suffix = "";
if (index != -1) {
// replace id
zentaoSteps = zentaoSteps.replaceAll(Pattern.quote(originSubUrl), id);
suffix = fileName.substring(index);
}
// replace id
zentaoSteps = zentaoSteps.replaceAll(Pattern.quote(originSubUrl), id + suffix);
}
// image link
String netImgRegex = "!\\[(.*?)]\\((http.*?)\\)";