fix: 测试用例关联缺陷列表状态没更新
This commit is contained in:
parent
8d8073acfd
commit
25ddb59527
|
@ -18,6 +18,7 @@
|
||||||
issues.lastmodify
|
issues.lastmodify
|
||||||
from issues
|
from issues
|
||||||
<include refid="queryWhereCondition"/>
|
<include refid="queryWhereCondition"/>
|
||||||
|
and (issues.platform_status != 'delete' or issues.platform_status is NULL)
|
||||||
<include refid="io.metersphere.base.mapper.ext.ExtBaseMapper.orders"/>
|
<include refid="io.metersphere.base.mapper.ext.ExtBaseMapper.orders"/>
|
||||||
</select>
|
</select>
|
||||||
<select id="getNextNum" resultType="io.metersphere.base.domain.Issues">
|
<select id="getNextNum" resultType="io.metersphere.base.domain.Issues">
|
||||||
|
@ -25,13 +26,14 @@
|
||||||
</select>
|
</select>
|
||||||
<select id="getRelateIssues" resultType="io.metersphere.base.domain.IssuesDao">
|
<select id="getRelateIssues" resultType="io.metersphere.base.domain.IssuesDao">
|
||||||
select issues.id, issues.num, issues.title, issues.project_id, issues.create_time, issues.update_time,
|
select issues.id, issues.num, issues.title, issues.project_id, issues.create_time, issues.update_time,
|
||||||
issues.description, issues.status, issues.platform, issues.custom_fields,test_case_issues.test_case_id,
|
issues.description, issues.status, issues.platform, issues.custom_fields,test_case_issues.test_case_id,issues.platform_status,
|
||||||
issues.lastmodify
|
issues.lastmodify
|
||||||
from issues
|
from issues
|
||||||
left join
|
left join
|
||||||
test_case_issues on issues.id = test_case_issues.issues_id
|
test_case_issues on issues.id = test_case_issues.issues_id
|
||||||
<include refid="queryWhereCondition"/>
|
<include refid="queryWhereCondition"/>
|
||||||
and (test_case_issues.test_case_id is null or test_case_issues.test_case_id != #{request.caseId})
|
and (test_case_issues.test_case_id is null or test_case_issues.test_case_id != #{request.caseId})
|
||||||
|
and (issues.platform_status != 'delete' or issues.platform_status is NULL)
|
||||||
<include refid="io.metersphere.base.mapper.ext.ExtBaseMapper.orders"/>
|
<include refid="io.metersphere.base.mapper.ext.ExtBaseMapper.orders"/>
|
||||||
</select>
|
</select>
|
||||||
<select id="getIssueForSync" resultType="io.metersphere.base.domain.IssuesDao">
|
<select id="getIssueForSync" resultType="io.metersphere.base.domain.IssuesDao">
|
||||||
|
|
|
@ -4,10 +4,7 @@ import com.alibaba.fastjson.JSON;
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.alibaba.fastjson.TypeReference;
|
import com.alibaba.fastjson.TypeReference;
|
||||||
import io.metersphere.base.domain.IssuesDao;
|
import io.metersphere.base.domain.*;
|
||||||
import io.metersphere.base.domain.IssuesExample;
|
|
||||||
import io.metersphere.base.domain.Project;
|
|
||||||
import io.metersphere.base.domain.TestCaseWithBLOBs;
|
|
||||||
import io.metersphere.commons.constants.IssuesManagePlatform;
|
import io.metersphere.commons.constants.IssuesManagePlatform;
|
||||||
import io.metersphere.commons.constants.IssuesStatus;
|
import io.metersphere.commons.constants.IssuesStatus;
|
||||||
import io.metersphere.commons.exception.MSException;
|
import io.metersphere.commons.exception.MSException;
|
||||||
|
@ -143,13 +140,13 @@ public class ZentaoPlatform extends AbstractIssuePlatform {
|
||||||
}
|
}
|
||||||
IssuesDao issues = new IssuesDao();
|
IssuesDao issues = new IssuesDao();
|
||||||
issues.setId(bug.getId());
|
issues.setId(bug.getId());
|
||||||
|
issues.setPlatformStatus(bug.getStatus());
|
||||||
if (StringUtils.equals(bug.getDeleted(),"1")) {
|
if (StringUtils.equals(bug.getDeleted(),"1")) {
|
||||||
issues.setPlatformStatus(IssuesStatus.DELETE.toString());
|
issues.setPlatformStatus(IssuesStatus.DELETE.toString());
|
||||||
issuesMapper.updateByPrimaryKeySelective(issues);
|
issuesMapper.updateByPrimaryKeySelective(issues);
|
||||||
}
|
}
|
||||||
issues.setTitle(bug.getTitle());
|
issues.setTitle(bug.getTitle());
|
||||||
issues.setDescription(steps);
|
issues.setDescription(steps);
|
||||||
issues.setPlatformStatus(bug.getStatus());
|
|
||||||
issues.setReporter(bug.getOpenedBy());
|
issues.setReporter(bug.getOpenedBy());
|
||||||
return issues;
|
return issues;
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,6 +31,16 @@
|
||||||
</ms-table-column>
|
</ms-table-column>
|
||||||
|
|
||||||
<ms-table-column
|
<ms-table-column
|
||||||
|
:label="$t('test_track.issue.platform_status')"
|
||||||
|
v-if="isThirdPart"
|
||||||
|
prop="platformStatus">
|
||||||
|
<template v-slot="scope">
|
||||||
|
{{ scope.row.platformStatus ? scope.row.platformStatus : '--'}}
|
||||||
|
</template>
|
||||||
|
</ms-table-column>
|
||||||
|
|
||||||
|
<ms-table-column
|
||||||
|
v-else
|
||||||
:label="$t('test_track.issue.status')"
|
:label="$t('test_track.issue.status')"
|
||||||
prop="status">
|
prop="status">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
|
@ -79,7 +89,7 @@ export default {
|
||||||
return getCurrentProjectID();
|
return getCurrentProjectID();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
props: ['caseId'],
|
props: ['caseId', 'isThirdPart'],
|
||||||
methods: {
|
methods: {
|
||||||
open() {
|
open() {
|
||||||
this.getIssues();
|
this.getIssues();
|
||||||
|
|
|
@ -30,6 +30,16 @@
|
||||||
</ms-table-column>
|
</ms-table-column>
|
||||||
|
|
||||||
<ms-table-column
|
<ms-table-column
|
||||||
|
:label="$t('test_track.issue.platform_status')"
|
||||||
|
v-if="isThirdPart"
|
||||||
|
prop="platformStatus">
|
||||||
|
<template v-slot="scope">
|
||||||
|
{{ scope.row.platformStatus ? scope.row.platformStatus : '--'}}
|
||||||
|
</template>
|
||||||
|
</ms-table-column>
|
||||||
|
|
||||||
|
<ms-table-column
|
||||||
|
v-else
|
||||||
:label="$t('test_track.issue.status')"
|
:label="$t('test_track.issue.status')"
|
||||||
prop="status">
|
prop="status">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
|
@ -66,7 +76,7 @@
|
||||||
</ms-table>
|
</ms-table>
|
||||||
|
|
||||||
<test-plan-issue-edit :plan-id="planId" :case-id="caseId" @refresh="getIssues" ref="issueEdit"/>
|
<test-plan-issue-edit :plan-id="planId" :case-id="caseId" @refresh="getIssues" ref="issueEdit"/>
|
||||||
<IssueRelateList :case-id="caseId" @refresh="getIssues" ref="issueRelate"/>
|
<IssueRelateList :is-third-part="isThirdPart" :case-id="caseId" @refresh="getIssues" ref="issueRelate"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -78,6 +88,7 @@ import IssueDescriptionTableItem from "@/business/components/track/issue/IssueDe
|
||||||
import {ISSUE_STATUS_MAP} from "@/common/js/table-constants";
|
import {ISSUE_STATUS_MAP} from "@/common/js/table-constants";
|
||||||
import IssueRelateList from "@/business/components/track/case/components/IssueRelateList";
|
import IssueRelateList from "@/business/components/track/case/components/IssueRelateList";
|
||||||
import {getIssuesByCaseId} from "@/network/Issue";
|
import {getIssuesByCaseId} from "@/network/Issue";
|
||||||
|
import {getIssueTemplate} from "@/network/custom-field-template";
|
||||||
export default {
|
export default {
|
||||||
name: "TestCaseIssueRelate",
|
name: "TestCaseIssueRelate",
|
||||||
components: {IssueRelateList, IssueDescriptionTableItem, MsTableColumn, MsTable, TestPlanIssueEdit},
|
components: {IssueRelateList, IssueDescriptionTableItem, MsTableColumn, MsTable, TestPlanIssueEdit},
|
||||||
|
@ -87,6 +98,7 @@ export default {
|
||||||
data: [],
|
data: [],
|
||||||
result: {},
|
result: {},
|
||||||
},
|
},
|
||||||
|
isThirdPart: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
props: ['caseId', 'readOnly','planId'],
|
props: ['caseId', 'readOnly','planId'],
|
||||||
|
@ -95,6 +107,16 @@ export default {
|
||||||
return ISSUE_STATUS_MAP;
|
return ISSUE_STATUS_MAP;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
created() {
|
||||||
|
getIssueTemplate()
|
||||||
|
.then((template) => {
|
||||||
|
if (template.platform === 'metersphere') {
|
||||||
|
this.isThirdPart = false;
|
||||||
|
} else {
|
||||||
|
this.isThirdPart = true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getIssues() {
|
getIssues() {
|
||||||
let result = getIssuesByCaseId(this.caseId, this.page);
|
let result = getIssuesByCaseId(this.caseId, this.page);
|
||||||
|
|
|
@ -69,8 +69,11 @@
|
||||||
<ms-table-column
|
<ms-table-column
|
||||||
:field="item"
|
:field="item"
|
||||||
:fields-width="fieldsWidth"
|
:fields-width="fieldsWidth"
|
||||||
:label="$t('test_track.issue.status')"
|
:label="$t('test_track.issue.platform_status') "
|
||||||
prop="platformStatus">
|
prop="platformStatus">
|
||||||
|
<template v-slot="scope">
|
||||||
|
{{ scope.row.platformStatus ? scope.row.platformStatus : '--'}}
|
||||||
|
</template>
|
||||||
</ms-table-column>
|
</ms-table-column>
|
||||||
|
|
||||||
<ms-table-column
|
<ms-table-column
|
||||||
|
|
|
@ -1618,6 +1618,7 @@ export default {
|
||||||
issue: {
|
issue: {
|
||||||
issue: "Issue",
|
issue: "Issue",
|
||||||
issue_management: "Issue Management",
|
issue_management: "Issue Management",
|
||||||
|
platform_status: "Platform Status",
|
||||||
issue_resource: "Issue source",
|
issue_resource: "Issue source",
|
||||||
create_issue: "Create Issue",
|
create_issue: "Create Issue",
|
||||||
add_issue: "Add Issue",
|
add_issue: "Add Issue",
|
||||||
|
|
|
@ -1622,6 +1622,7 @@ export default {
|
||||||
issue: {
|
issue: {
|
||||||
issue: "缺陷",
|
issue: "缺陷",
|
||||||
issue_management: "缺陷管理",
|
issue_management: "缺陷管理",
|
||||||
|
platform_status: "平台状态",
|
||||||
issue_resource: "缺陷来源",
|
issue_resource: "缺陷来源",
|
||||||
create_issue: "创建缺陷",
|
create_issue: "创建缺陷",
|
||||||
add_issue: "添加缺陷",
|
add_issue: "添加缺陷",
|
||||||
|
|
|
@ -1622,6 +1622,7 @@ export default {
|
||||||
issue: {
|
issue: {
|
||||||
issue: "缺陷",
|
issue: "缺陷",
|
||||||
issue_management: "缺陷管理",
|
issue_management: "缺陷管理",
|
||||||
|
platform_status: "平臺狀態",
|
||||||
issue_resource: "缺陷來源",
|
issue_resource: "缺陷來源",
|
||||||
create_issue: "創建缺陷",
|
create_issue: "創建缺陷",
|
||||||
add_issue: "添加缺陷",
|
add_issue: "添加缺陷",
|
||||||
|
|
Loading…
Reference in New Issue