提交 d9f911f7 编写于 作者: S shiziyuan9527 提交者: 刘瑞斌

refactor(缺陷管理): 默认模版

上级 93973016
......@@ -164,10 +164,11 @@ public class IssueTemplateService extends TemplateBaseService {
public List<IssueTemplate> getOption(String workspaceId) {
IssueTemplateExample example = new IssueTemplateExample();
example.createCriteria()
.andWorkspaceIdEqualTo(workspaceId)
.andSystemEqualTo(false);
.andWorkspaceIdEqualTo(workspaceId);
example.or().andGlobalEqualTo(true);
// .andSystemEqualTo(false);
List<IssueTemplate> issueTemplates = issueTemplateMapper.selectByExample(example);
issueTemplates.add(getDefaultTemplate(workspaceId));
// issueTemplates.add(getDefaultTemplate(workspaceId));
return issueTemplates;
}
......
......@@ -88,6 +88,16 @@ CREATE TABLE IF NOT EXISTS `issue_template` (
INSERT INTO issue_template (id,`name`,platform,description,title,`global`,`system`,workspace_id,content,create_time,update_time)
VALUES ('5d7c87d2-f405-4ec1-9a3d-71b514cdfda3','default','metersphere','','',1,1,'global','',unix_timestamp() * 1000,unix_timestamp() * 1000);
insert into issue_template (id,name,platform,description,title,`system`,`global`,workspace_id,content,create_time,update_time)
values ('c7f26296-cf62-4149-a4d2-ce2492729e41','JIRA-默认模版','Jira','JIRA默认模版','',1,1,'global','',unix_timestamp() * 1000,unix_timestamp() * 1000);
insert into issue_template (id,name,platform,description,title,`system`,`global`,workspace_id,content,create_time,update_time)
values ('f2b70824-471e-426e-9219-f82aba6dd560','禅道-默认模版','Zentao','禅道默认模版','',1,1,'global','', unix_timestamp() * 1000,unix_timestamp() * 1000);
insert into issue_template (id,name,platform,description,title,`system`,`global`,workspace_id,content,create_time,update_time)
values ('f2cd9e48-f136-4528-8249-a649c15aa3a4','TAPD-默认模版','Tapd','TAPD默认模版','',1,1,'global','',unix_timestamp() * 1000,unix_timestamp() * 1000);
-- 字段模板关联表
CREATE TABLE IF NOT EXISTS `custom_field_template` (
`id` varchar(50) NOT NULL COMMENT 'Custom field field template related id',
......
......@@ -44,11 +44,12 @@ export default {
this.$get(url + getCurrentWorkspaceId(), (response) => {
this.templateOptions = response.data;
if (!this.data[this.prop]) {
this.templateOptions.forEach(item => {
for(let item of this.templateOptions) {
if (item.system) {
this.data[this.prop] = item.id;
this.$set(this.data, this.prop, item.id);
break;
}
});
}
}
});
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册