fix: 修改关联缺陷模板未生效 (#2176)

Co-authored-by: chenjianxing <jianxing.chen@fit2cloud.com>
This commit is contained in:
metersphere-bot 2021-04-22 14:28:31 +08:00 committed by GitHub
parent 6980c6aaa1
commit 26c3489435
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 5 deletions

View File

@ -173,11 +173,11 @@ public class IssueTemplateService extends TemplateBaseService {
public IssueTemplateDao getTemplate(String projectId) { public IssueTemplateDao getTemplate(String projectId) {
Project project = projectService.getProjectById(projectId); Project project = projectService.getProjectById(projectId);
String caseTemplateId = project.getCaseTemplateId(); String issueTemplateId = project.getIssueTemplateId();
IssueTemplate issueTemplate = null; IssueTemplate issueTemplate = null;
IssueTemplateDao issueTemplateDao = new IssueTemplateDao(); IssueTemplateDao issueTemplateDao = new IssueTemplateDao();
if (StringUtils.isNotBlank(caseTemplateId)) { if (StringUtils.isNotBlank(issueTemplateId)) {
issueTemplate = issueTemplateMapper.selectByPrimaryKey(caseTemplateId); issueTemplate = issueTemplateMapper.selectByPrimaryKey(issueTemplateId);
if (issueTemplate == null) { if (issueTemplate == null) {
issueTemplate = getDefaultTemplate(project.getWorkspaceId()); issueTemplate = getDefaultTemplate(project.getWorkspaceId());
} }

View File

@ -187,8 +187,8 @@ export default {
} }
} else { } else {
this.form = { this.form = {
title: '', title: this.issueTemplate.title,
description: '' description: this.issueTemplate.content
} }
this.url = 'issues/add'; this.url = 'issues/add';
} }

View File

@ -25,6 +25,7 @@ export const CASE_TYPE_OPTION = [
export const ISSUE_PLATFORM_OPTION = [ export const ISSUE_PLATFORM_OPTION = [
{value: 'metersphere',text: 'Metersphere'}, {value: 'metersphere',text: 'Metersphere'},
{value: 'jira',text: 'JIRA'}, {value: 'jira',text: 'JIRA'},
{value: 'Tapd',text: 'Tapd'},
{value: 'zentao',text: '禅道'}, {value: 'zentao',text: '禅道'},
]; ];