fix(测试跟踪): 同步缺陷代码优化

This commit is contained in:
chenjianxing 2022-12-20 22:24:03 +08:00 committed by jianxing
parent 4c2a0909ca
commit 2d5b21f487
7 changed files with 9 additions and 7 deletions

View File

@ -471,7 +471,7 @@ export default {
zentao_bug_build: "Zentao Impact version", zentao_bug_build: "Zentao Impact version",
zentao_bug_assigned: "Zentao handler", zentao_bug_assigned: "Zentao handler",
third_party_integrated: "Third-party Platform", third_party_integrated: "Third-party Platform",
use_third_party: "Enable Jira Issue Template", use_third_party: "Enable {0} Issue Template",
update_third_party_bugs: "Update the defects of third-party platforms", update_third_party_bugs: "Update the defects of third-party platforms",
sync_bugs: "Synchronization Issue", sync_bugs: "Synchronization Issue",
sync_complete: "Synchronization complete", sync_complete: "Synchronization complete",

View File

@ -474,7 +474,7 @@ export default {
zentao_bug_build: "禅道 影响版本", zentao_bug_build: "禅道 影响版本",
zentao_bug_assigned: "禅道 处理人", zentao_bug_assigned: "禅道 处理人",
third_party_integrated: "集成第三方平台", third_party_integrated: "集成第三方平台",
use_third_party: "使用 Jira 缺陷模板", use_third_party: "使用 {0} 缺陷模板",
update_third_party_bugs: "更新第三方平台的缺陷", update_third_party_bugs: "更新第三方平台的缺陷",
sync_bugs: "同步缺陷", sync_bugs: "同步缺陷",
sync_complete: "同步完成", sync_complete: "同步完成",

View File

@ -474,7 +474,7 @@ export default {
zentao_bug_build: "禪道 影響版本", zentao_bug_build: "禪道 影響版本",
zentao_bug_assigned: "禪道 處理人", zentao_bug_assigned: "禪道 處理人",
third_party_integrated: "集成第三方平臺", third_party_integrated: "集成第三方平臺",
use_third_party: "使用 Jira 缺陷模闆", use_third_party: "使用 {0} 缺陷模闆",
update_third_party_bugs: "更新第三方平臺的缺陷", update_third_party_bugs: "更新第三方平臺的缺陷",
sync_bugs: "同步缺陷", sync_bugs: "同步缺陷",
sync_complete: "同步完成", sync_complete: "同步完成",

View File

@ -31,7 +31,7 @@
<el-checkbox @change="thirdPartTemplateChange" v-if="thirdPartTemplateSupport" <el-checkbox @change="thirdPartTemplateChange" v-if="thirdPartTemplateSupport"
v-model="form.thirdPartTemplate" style="margin-left: 10px"> v-model="form.thirdPartTemplate" style="margin-left: 10px">
{{ $t('test_track.issue.use_third_party') }} {{ $t('test_track.issue.use_third_party', [form.platform]) }}
</el-checkbox> </el-checkbox>
</el-form-item> </el-form-item>

View File

@ -31,7 +31,7 @@
<el-checkbox @change="thirdPartTemplateChange" v-if="thirdPartTemplateSupport" <el-checkbox @change="thirdPartTemplateChange" v-if="thirdPartTemplateSupport"
v-model="form.thirdPartTemplate" style="margin-left: 10px"> v-model="form.thirdPartTemplate" style="margin-left: 10px">
{{ $t('test_track.issue.use_third_party') }} {{ $t('test_track.issue.use_third_party', [form.platform]) }}
</el-checkbox> </el-checkbox>
</el-form-item> </el-form-item>

View File

@ -112,7 +112,7 @@
group by issues.id group by issues.id
</select> </select>
<select id="getIssueForSync" resultType="io.metersphere.xpack.track.dto.IssuesDao"> <select id="getIssueForSync" resultType="io.metersphere.xpack.track.dto.IssuesDao">
select id, platform, platform_id, create_time select id, platform, platform_id, create_time, update_time
from issues from issues
where project_id = #{projectId} and platform = #{platform} and (platform_status != 'delete' or platform_status is null); where project_id = #{projectId} and platform = #{platform} and (platform_status != 'delete' or platform_status is null);
</select> </select>

View File

@ -292,7 +292,9 @@ public class IssuesService {
issues.setId(UUID.randomUUID().toString()); issues.setId(UUID.randomUUID().toString());
} }
issues.setCreateTime(System.currentTimeMillis()); issues.setCreateTime(System.currentTimeMillis());
if (issues.getUpdateTime() == null) {
issues.setUpdateTime(System.currentTimeMillis()); issues.setUpdateTime(System.currentTimeMillis());
}
issues.setNum(getNextNum(issues.getProjectId())); issues.setNum(getNextNum(issues.getProjectId()));
issues.setCreator(SessionUtils.getUserId()); issues.setCreator(SessionUtils.getUserId());
issuesMapper.insert(issues); issuesMapper.insert(issues);