Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
abd9bad78b
|
@ -7,6 +7,7 @@
|
||||||
from test_case_issues, issues
|
from test_case_issues, issues
|
||||||
where test_case_issues.issues_id = issues.id
|
where test_case_issues.issues_id = issues.id
|
||||||
and test_case_issues.test_case_id = #{caseId}
|
and test_case_issues.test_case_id = #{caseId}
|
||||||
and issues.platform = #{platform};
|
and issues.platform = #{platform}
|
||||||
|
order by issues.create_time DESC
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
|
@ -310,7 +310,11 @@ public class IssuesService {
|
||||||
return new Issues();
|
return new Issues();
|
||||||
}
|
}
|
||||||
JSONObject jsonObject = JSONObject.parseObject(listJson);
|
JSONObject jsonObject = JSONObject.parseObject(listJson);
|
||||||
return jsonObject.getObject("Bug", Issues.class);
|
JSONObject bug = jsonObject.getJSONObject("Bug");
|
||||||
|
Long created = bug.getLong("created");
|
||||||
|
Issues issues = jsonObject.getObject("Bug", Issues.class);
|
||||||
|
issues.setCreateTime(created);
|
||||||
|
return issues;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Issues getJiraIssues(HttpHeaders headers, String url, String issuesId) {
|
public Issues getJiraIssues(HttpHeaders headers, String url, String issuesId) {
|
||||||
|
@ -326,15 +330,23 @@ public class IssuesService {
|
||||||
JSONObject obj = JSONObject.parseObject(body);
|
JSONObject obj = JSONObject.parseObject(body);
|
||||||
JSONObject fields = (JSONObject) obj.get("fields");
|
JSONObject fields = (JSONObject) obj.get("fields");
|
||||||
JSONObject statusObj = (JSONObject) fields.get("status");
|
JSONObject statusObj = (JSONObject) fields.get("status");
|
||||||
|
JSONObject assignee = (JSONObject) fields.get("assignee");
|
||||||
JSONObject statusCategory = (JSONObject) statusObj.get("statusCategory");
|
JSONObject statusCategory = (JSONObject) statusObj.get("statusCategory");
|
||||||
|
|
||||||
String id = obj.getString("id");
|
String id = obj.getString("id");
|
||||||
String title = fields.getString("summary");
|
String title = fields.getString("summary");
|
||||||
String description = fields.getString("description");
|
String description = fields.getString("description");
|
||||||
String status = statusCategory.getString("key");
|
String status = statusCategory.getString("key");
|
||||||
|
Long createTime = fields.getLong("created");
|
||||||
|
String lastmodify = "";
|
||||||
|
if (assignee != null) {
|
||||||
|
lastmodify = assignee.getString("displayName");
|
||||||
|
}
|
||||||
|
|
||||||
issues.setId(id);
|
issues.setId(id);
|
||||||
issues.setTitle(title);
|
issues.setTitle(title);
|
||||||
|
issues.setCreateTime(createTime);
|
||||||
|
issues.setLastmodify(lastmodify);
|
||||||
issues.setDescription(description);
|
issues.setDescription(description);
|
||||||
issues.setStatus(status);
|
issues.setStatus(status);
|
||||||
issues.setPlatform(IssuesManagePlatform.Jira.toString());
|
issues.setPlatform(IssuesManagePlatform.Jira.toString());
|
||||||
|
|
|
@ -269,11 +269,17 @@ public class TestPlanService {
|
||||||
List<Issues> issue = issuesService.getIssues(testCase.getCaseId());
|
List<Issues> issue = issuesService.getIssues(testCase.getCaseId());
|
||||||
if (issue.size() > 0) {
|
if (issue.size() > 0) {
|
||||||
for (Issues i : issue) {
|
for (Issues i : issue) {
|
||||||
i.setModel(testCase.getModel());
|
i.setModel(testCase.getNodePath());
|
||||||
String des = i.getDescription().replaceAll("<p>", "").replaceAll("</p>", "");
|
String des = i.getDescription().replaceAll("<p>", "").replaceAll("</p>", "");
|
||||||
i.setDescription(des);
|
i.setDescription(des);
|
||||||
|
if (i.getLastmodify() == null || i.getLastmodify() == "") {
|
||||||
|
if (i.getReporter() != null || i.getReporter() != "") {
|
||||||
|
i.setLastmodify(i.getReporter());
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
issues.addAll(issue);
|
issues.addAll(issue);
|
||||||
|
Collections.sort(issues, Comparator.comparing(Issues::getCreateTime, (t1, t2) -> t2.compareTo(t1)));
|
||||||
}
|
}
|
||||||
|
|
||||||
components.forEach(component -> {
|
components.forEach(component -> {
|
||||||
|
|
|
@ -20,7 +20,7 @@ create table if not exists issues
|
||||||
(
|
(
|
||||||
id varchar(50) not null
|
id varchar(50) not null
|
||||||
primary key,
|
primary key,
|
||||||
title varchar(50) null,
|
title varchar(64) null,
|
||||||
description text null,
|
description text null,
|
||||||
status varchar(50) null,
|
status varchar(50) null,
|
||||||
create_time bigint(13) null,
|
create_time bigint(13) null,
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
<slot name="button"></slot>
|
<slot name="button"></slot>
|
||||||
</span>
|
</span>
|
||||||
<span>
|
<span>
|
||||||
<ms-table-search-bar :condition.sync="condition" @change="search" class="search-bar"/>
|
<ms-table-search-bar :condition.sync="condition" @change="search" class="search-bar" :tip="tip"/>
|
||||||
<ms-table-adv-search-bar :condition.sync="condition" @search="search" v-if="isCombine"/>
|
<ms-table-adv-search-bar :condition.sync="condition" @search="search" v-if="isCombine"/>
|
||||||
</span>
|
</span>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
@ -65,6 +65,12 @@
|
||||||
isTesterPermission: {
|
isTesterPermission: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
|
},
|
||||||
|
tip: {
|
||||||
|
String,
|
||||||
|
default() {
|
||||||
|
return this.$t('commons.search_by_name');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
class="search"
|
class="search"
|
||||||
type="text"
|
type="text"
|
||||||
size="small"
|
size="small"
|
||||||
:placeholder="$t('commons.search_by_name')"
|
:placeholder="tip"
|
||||||
prefix-icon="el-icon-search"
|
prefix-icon="el-icon-search"
|
||||||
@change="search"
|
@change="search"
|
||||||
maxlength="60"
|
maxlength="60"
|
||||||
|
@ -18,6 +18,12 @@
|
||||||
props: {
|
props: {
|
||||||
condition: {
|
condition: {
|
||||||
type: Object
|
type: Object
|
||||||
|
},
|
||||||
|
tip: {
|
||||||
|
String,
|
||||||
|
default() {
|
||||||
|
return this.$t('commons.search_by_name');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<el-card class="card-content" v-loading="result.loading">
|
<el-card class="card-content" v-loading="result.loading">
|
||||||
<template v-slot:header>
|
<template v-slot:header>
|
||||||
|
|
||||||
<ms-table-header :is-tester-permission="true" :condition.sync="condition" @search="initTableData"
|
<ms-table-header :is-tester-permission="true" :condition.sync="condition" @search="initTableData" :tip="$t('commons.search_by_name_or_id')"
|
||||||
:create-tip="$t('test_track.case.create')" @create="testCaseCreate">
|
:create-tip="$t('test_track.case.create')" @create="testCaseCreate">
|
||||||
<template v-slot:title>
|
<template v-slot:title>
|
||||||
<node-breadcrumb class="table-title" :nodes="selectParentNodes" @refresh="refresh"/>
|
<node-breadcrumb class="table-title" :nodes="selectParentNodes" @refresh="refresh"/>
|
||||||
|
|
|
@ -137,6 +137,9 @@
|
||||||
this.getCaseNames();
|
this.getCaseNames();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
updated() {
|
||||||
|
this.toggleSelection(this.testCases);
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
openTestCaseRelevanceDialog() {
|
openTestCaseRelevanceDialog() {
|
||||||
this.initData();
|
this.initData();
|
||||||
|
@ -178,7 +181,12 @@
|
||||||
this.selectIds.add(item.id);
|
this.selectIds.add(item.id);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.selectIds.clear();
|
// this.selectIds.clear();
|
||||||
|
this.testCases.forEach(item => {
|
||||||
|
if (this.selectIds.has(item.id)) {
|
||||||
|
this.selectIds.delete(item.id);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleSelectionChange(selection, row) {
|
handleSelectionChange(selection, row) {
|
||||||
|
@ -215,6 +223,16 @@
|
||||||
_filter(filters, this.condition);
|
_filter(filters, this.condition);
|
||||||
this.initData();
|
this.initData();
|
||||||
},
|
},
|
||||||
|
toggleSelection(rows) {
|
||||||
|
rows.forEach(row => {
|
||||||
|
this.selectIds.forEach(id => {
|
||||||
|
if (row.id === id) {
|
||||||
|
// true 是为选中
|
||||||
|
this.$refs.table.toggleRowSelection(row, true)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -194,7 +194,7 @@
|
||||||
type="text"
|
type="text"
|
||||||
:placeholder="$t('test_track.issue.input_title')"
|
:placeholder="$t('test_track.issue.input_title')"
|
||||||
v-model="testCase.issues.title"
|
v-model="testCase.issues.title"
|
||||||
maxlength="100"
|
maxlength="60"
|
||||||
show-word-limit
|
show-word-limit
|
||||||
/>
|
/>
|
||||||
<ckeditor :editor="editor" :disabled="isReadOnly" :config="editorConfig"
|
<ckeditor :editor="editor" :disabled="isReadOnly" :config="editorConfig"
|
||||||
|
@ -404,7 +404,6 @@
|
||||||
this.activeTab = 'detail';
|
this.activeTab = 'detail';
|
||||||
listenGoBack(this.handleClose);
|
listenGoBack(this.handleClose);
|
||||||
this.initData(testCase);
|
this.initData(testCase);
|
||||||
this.getIssues(testCase.caseId);
|
|
||||||
},
|
},
|
||||||
initTest() {
|
initTest() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
|
@ -498,7 +497,10 @@
|
||||||
this.result = this.$post("/issues/add", param, () => {
|
this.result = this.$post("/issues/add", param, () => {
|
||||||
this.$success(this.$t('commons.save_success'));
|
this.$success(this.$t('commons.save_success'));
|
||||||
this.getIssues(param.testCaseId);
|
this.getIssues(param.testCaseId);
|
||||||
})
|
});
|
||||||
|
this.issuesSwitch = false;
|
||||||
|
this.testCase.issues.title = "";
|
||||||
|
this.testCase.issues.content = "";
|
||||||
},
|
},
|
||||||
getIssues(caseId) {
|
getIssues(caseId) {
|
||||||
this.result = this.$get("/issues/get/" + caseId, response => {
|
this.result = this.$get("/issues/get/" + caseId, response => {
|
||||||
|
|
|
@ -32,9 +32,9 @@
|
||||||
show-overflow-tooltip>
|
show-overflow-tooltip>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="reporter"
|
prop="lastmodify"
|
||||||
:label="$t('test_track.module.current_owner')"
|
:label="$t('test_track.module.current_owner')"
|
||||||
show-overflow-tooltip>
|
show-overflow-tooltip>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
|
|
|
@ -60,6 +60,7 @@ export default {
|
||||||
not_filled: 'Not filled',
|
not_filled: 'Not filled',
|
||||||
please_select: 'Please select',
|
please_select: 'Please select',
|
||||||
search_by_name: 'Search by name',
|
search_by_name: 'Search by name',
|
||||||
|
search_by_name_or_id: 'Search by name or id',
|
||||||
personal_information: 'Personal Information',
|
personal_information: 'Personal Information',
|
||||||
exit_system: 'Exit System',
|
exit_system: 'Exit System',
|
||||||
verification: 'Verification',
|
verification: 'Verification',
|
||||||
|
|
|
@ -60,6 +60,7 @@ export default {
|
||||||
not_filled: '未填写',
|
not_filled: '未填写',
|
||||||
please_select: '请选择',
|
please_select: '请选择',
|
||||||
search_by_name: '根据名称搜索',
|
search_by_name: '根据名称搜索',
|
||||||
|
search_by_name_or_id: '根据ID或名称搜索',
|
||||||
personal_information: '个人信息',
|
personal_information: '个人信息',
|
||||||
exit_system: '退出系统',
|
exit_system: '退出系统',
|
||||||
verification: '验证',
|
verification: '验证',
|
||||||
|
|
|
@ -60,6 +60,7 @@ export default {
|
||||||
not_filled: '未填寫',
|
not_filled: '未填寫',
|
||||||
please_select: '請選擇',
|
please_select: '請選擇',
|
||||||
search_by_name: '根據名稱搜索',
|
search_by_name: '根據名稱搜索',
|
||||||
|
search_by_name_or_id: '根據ID或名稱搜索',
|
||||||
personal_information: '個人信息',
|
personal_information: '個人信息',
|
||||||
exit_system: '退出系統',
|
exit_system: '退出系統',
|
||||||
verification: '驗證',
|
verification: '驗證',
|
||||||
|
|
Loading…
Reference in New Issue