mirror of
https://gitee.com/fit2cloud-feizhiyun/MeterSphere.git
synced 2024-12-03 20:49:56 +08:00
fix(缺陷管理): 项目模板缺陷内容默认值带有图片保存报错问题
This commit is contained in:
parent
36e7c48b1c
commit
54b6c1d53a
@ -1364,9 +1364,22 @@ public class BugService {
|
|||||||
* @param currentUser 当前用户
|
* @param currentUser 当前用户
|
||||||
*/
|
*/
|
||||||
private void handleRichTextTmpFile(BugEditRequest request, String bugId, String currentUser) {
|
private void handleRichTextTmpFile(BugEditRequest request, String bugId, String currentUser) {
|
||||||
|
filterRichTextTmpFile(request);
|
||||||
bugAttachmentService.transferTmpFile(bugId, request.getProjectId(), request.getRichTextTmpFileIds(), currentUser, BugAttachmentSourceType.RICH_TEXT.name());
|
bugAttachmentService.transferTmpFile(bugId, request.getProjectId(), request.getRichTextTmpFileIds(), currentUser, BugAttachmentSourceType.RICH_TEXT.name());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 过滤富文本临时文件
|
||||||
|
*
|
||||||
|
* @param request 请求参数
|
||||||
|
*/
|
||||||
|
private void filterRichTextTmpFile(BugEditRequest request) {
|
||||||
|
// 项目模板带过来的图片文件不处理
|
||||||
|
if (CollectionUtils.isNotEmpty(request.getRichTextTmpFileIds())) {
|
||||||
|
request.getRichTextTmpFileIds().removeIf(tmpFileId -> request.getDescription().contains("/project/template/img/preview/" + request.getProjectId() + "/" + tmpFileId));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 处理并保存缺陷用例关联关系
|
* 处理并保存缺陷用例关联关系
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user