fix(测试跟踪): 同步缺陷后创建人变了

--bug=1032520 --user=陈建星 【测试跟踪】github#27333,点击同步缺陷,ms上的缺陷创建人变为ms的系统管理员,数据库中creator变为admin。jira侧创建人是实际创建人 https://www.tapd.cn/55049933/s/1435875
This commit is contained in:
AgAngle 2023-11-17 14:22:25 +08:00 committed by 刘瑞斌
parent b09321a665
commit d83177ebbf
2 changed files with 5 additions and 1 deletions

View File

@ -1058,7 +1058,10 @@ public class IssuesService {
AttachmentModuleRelationMapper batchAttachmentModuleRelationMapper = sqlSession.getMapper(AttachmentModuleRelationMapper.class); AttachmentModuleRelationMapper batchAttachmentModuleRelationMapper = sqlSession.getMapper(AttachmentModuleRelationMapper.class);
// 批量更新 // 批量更新
updateIssues.forEach(issueBatchMapper::updateByPrimaryKeySelective); updateIssues.forEach(issue -> {
issue.setCreator(null);
issueBatchMapper.updateByPrimaryKeySelective(issue);
});
// 批量删除 // 批量删除
syncIssuesResult.getDeleteIssuesIds() syncIssuesResult.getDeleteIssuesIds()

View File

@ -226,6 +226,7 @@ public class TapdPlatform extends AbstractIssuePlatform {
IssuesDao issuesDao = new IssuesDao(); IssuesDao issuesDao = new IssuesDao();
issuesDao.setId(idMap.get(id)); issuesDao.setId(idMap.get(id));
issuesDao.setPlatformStatus(IssuesStatus.DELETE.toString()); issuesDao.setPlatformStatus(IssuesStatus.DELETE.toString());
issuesDao.setCreator(null);
issuesMapper.updateByPrimaryKeySelective(issuesDao); issuesMapper.updateByPrimaryKeySelective(issuesDao);
} }
}); });