fix(测试跟踪): 关联Jira平台使用默认模板修改平台状态报错问题

--bug=1017192 --user=宋昌昌 【测试跟踪】缺陷管理-关联Jira平台-修改平台状态报500 https://www.tapd.cn/55049933/s/1250456
This commit is contained in:
song-cc-rock 2022-09-22 16:10:10 +08:00 committed by jianxing
parent 555e14dc28
commit d15f7001cb
1 changed files with 9 additions and 7 deletions

View File

@ -934,13 +934,15 @@ public class JiraPlatform extends AbstractIssuePlatform {
// 获取富文本图片附件名称
List<CustomFieldItemDTO> richTexts = request.getRequestFields().stream().filter(item -> item.getType().equals("richText")).collect(Collectors.toList());
richTexts.forEach(richText -> {
String url = richText.getValue().toString();
if (url.contains("fileName")) {
// 本地上传的图片URL
msFileNames.add(url.substring(url.indexOf("=") + 1, url.lastIndexOf(")")));
} else if (url.contains("platform=Jira")) {
// Jira同步的图片URL
msFileNames.add(url.substring(url.indexOf("[") + 1, url.indexOf("]")));
if (richText.getValue() != null) {
String url = richText.getValue().toString();
if (url.contains("fileName")) {
// 本地上传的图片URL
msFileNames.add(url.substring(url.indexOf("=") + 1, url.lastIndexOf(")")));
} else if (url.contains("platform=Jira")) {
// Jira同步的图片URL
msFileNames.add(url.substring(url.indexOf("[") + 1, url.indexOf("]")));
}
}
});