fix(测试跟踪): 测试计划只读权限查询用例失败
This commit is contained in:
parent
0b8ccd8935
commit
8cb60e4634
|
@ -370,7 +370,7 @@ public class TestCaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/edit/follows/{caseId}")
|
@PostMapping("/edit/follows/{caseId}")
|
||||||
@RequiresPermissions(PermissionConstants.PROJECT_TRACK_PLAN_READ_EDIT)
|
@RequiresPermissions(PermissionConstants.PROJECT_TRACK_CASE_READ_EDIT)
|
||||||
public void editTestFollows(@PathVariable String caseId, @RequestBody List<String> follows) {
|
public void editTestFollows(@PathVariable String caseId, @RequestBody List<String> follows) {
|
||||||
testCaseService.saveFollows(caseId, follows);
|
testCaseService.saveFollows(caseId, follows);
|
||||||
}
|
}
|
||||||
|
|
|
@ -123,6 +123,14 @@ public class TestPlanController {
|
||||||
return testPlanService.editTestPlanWithRequest(testPlanDTO);
|
return testPlanService.editTestPlanWithRequest(testPlanDTO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/fresh/{planId}")
|
||||||
|
public TestPlan freshRecentPlan(@PathVariable String planId) {
|
||||||
|
AddTestPlanRequest request = new AddTestPlanRequest();
|
||||||
|
request.setId(planId);
|
||||||
|
request.setUpdateTime(System.currentTimeMillis());
|
||||||
|
return testPlanService.editTestPlanWithRequest(request);
|
||||||
|
}
|
||||||
|
|
||||||
@PostMapping("/edit/status/{planId}")
|
@PostMapping("/edit/status/{planId}")
|
||||||
@RequiresPermissions(PermissionConstants.PROJECT_TRACK_PLAN_READ_EDIT)
|
@RequiresPermissions(PermissionConstants.PROJECT_TRACK_PLAN_READ_EDIT)
|
||||||
@MsAuditLog(module = OperLogModule.TRACK_TEST_PLAN, type = OperLogConstants.UPDATE, beforeEvent = "#msClass.getLogDetails(#planId)", content = "#msClass.getLogDetails(#planId)", msClass = TestPlanService.class)
|
@MsAuditLog(module = OperLogModule.TRACK_TEST_PLAN, type = OperLogConstants.UPDATE, beforeEvent = "#msClass.getLogDetails(#planId)", content = "#msClass.getLogDetails(#planId)", msClass = TestPlanService.class)
|
||||||
|
|
|
@ -82,6 +82,10 @@ export function getIssuesByCaseId(refType, caseId, page) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function getOriginIssuesByCaseId(refType, caseId) {
|
||||||
|
return get('issues/get/case/' + refType + '/' + caseId);
|
||||||
|
}
|
||||||
|
|
||||||
export function getIssuesById(id) {
|
export function getIssuesById(id) {
|
||||||
return id ? get('/issues/get/' + id) : {};
|
return id ? get('/issues/get/' + id) : {};
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,6 +20,10 @@ export function testPlanEditStatus(id) {
|
||||||
return post(BASE_URL + `edit/status/${id}`, {});
|
return post(BASE_URL + `edit/status/${id}`, {});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function testPlanFresh(planId) {
|
||||||
|
return post(BASE_URL + `fresh/${planId}`, {});
|
||||||
|
}
|
||||||
|
|
||||||
export function testPlanAdd(param) {
|
export function testPlanAdd(param) {
|
||||||
return post(BASE_URL + 'add', param);
|
return post(BASE_URL + 'add', param);
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,6 +49,7 @@ import {addIssueHotBox} from "./minderUtils";
|
||||||
import MsModuleMinder from "@/business/common/minder/MsModuleMinder";
|
import MsModuleMinder from "@/business/common/minder/MsModuleMinder";
|
||||||
import {useStore} from "@/store";
|
import {useStore} from "@/store";
|
||||||
import {testPlanCaseMinderEdit} from "@/api/remote/plan/test-plan-case";
|
import {testPlanCaseMinderEdit} from "@/api/remote/plan/test-plan-case";
|
||||||
|
import {hasPermission} from "@/business/utils/sdk-utils";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "TestPlanMinder",
|
name: "TestPlanMinder",
|
||||||
|
@ -87,7 +88,7 @@ export default {
|
||||||
return getCurrentWorkspaceId();
|
return getCurrentWorkspaceId();
|
||||||
},
|
},
|
||||||
disableMinder() {
|
disableMinder() {
|
||||||
if (this.planStatus === 'Archived') {
|
if (this.planStatus === 'Archived' || !hasPermission('PROJECT_TRACK_PLAN:READ+RUN')) {
|
||||||
return true
|
return true
|
||||||
} else {
|
} else {
|
||||||
return false
|
return false
|
||||||
|
|
|
@ -299,8 +299,7 @@ import {getTestTemplate} from "@/api/custom-field-template";
|
||||||
import {
|
import {
|
||||||
editTestPlanTestCaseOrder,
|
editTestPlanTestCaseOrder,
|
||||||
testPlanAutoCheck,
|
testPlanAutoCheck,
|
||||||
testPlanEdit,
|
testPlanEditStatus, testPlanFresh,
|
||||||
testPlanEditStatus,
|
|
||||||
testPlanGet
|
testPlanGet
|
||||||
} from "@/api/remote/plan/test-plan";
|
} from "@/api/remote/plan/test-plan";
|
||||||
import {SYSTEM_FIELD_NAME_MAP} from "metersphere-frontend/src/utils/table-constants";
|
import {SYSTEM_FIELD_NAME_MAP} from "metersphere-frontend/src/utils/table-constants";
|
||||||
|
@ -313,6 +312,7 @@ import {
|
||||||
testPlanTestCaseDelete,
|
testPlanTestCaseDelete,
|
||||||
testPlanTestCaseEdit
|
testPlanTestCaseEdit
|
||||||
} from "@/api/remote/plan/test-plan-test-case";
|
} from "@/api/remote/plan/test-plan-test-case";
|
||||||
|
import {getIssuesByCaseId, getOriginIssuesByCaseId} from "@/api/issue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "FunctionalTestCaseList",
|
name: "FunctionalTestCaseList",
|
||||||
|
@ -517,11 +517,11 @@ export default {
|
||||||
methods: {
|
methods: {
|
||||||
loadIssue(row) {
|
loadIssue(row) {
|
||||||
if (row.issuesSize && !row.hasLoadIssue) {
|
if (row.issuesSize && !row.hasLoadIssue) {
|
||||||
// todo
|
getOriginIssuesByCaseId('PLAN_FUNCTIONAL', row.id)
|
||||||
// this.$get("/issues/get/case/PLAN_FUNCTIONAL/" + row.id).then(response => {
|
.then(r => {
|
||||||
// this.$set(row, "issuesContent", response.data.data);
|
this.$set(row, "issuesContent", r.data);
|
||||||
// this.$set(row, "hasLoadIssue", true);
|
this.$set(row, "hasLoadIssue", true);
|
||||||
// });
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleOpenFailureTestCase(row) {
|
handleOpenFailureTestCase(row) {
|
||||||
|
@ -681,12 +681,6 @@ export default {
|
||||||
this.getTestPlanById();
|
this.getTestPlanById();
|
||||||
this.initTableData();
|
this.initTableData();
|
||||||
},
|
},
|
||||||
refreshTestPlanRecent() {
|
|
||||||
let param = {};
|
|
||||||
param.id = this.planId;
|
|
||||||
param.updateTime = Date.now();
|
|
||||||
testPlanEdit(param);
|
|
||||||
},
|
|
||||||
search() {
|
search() {
|
||||||
this.initTableData();
|
this.initTableData();
|
||||||
this.$emit('search');
|
this.$emit('search');
|
||||||
|
@ -765,8 +759,8 @@ export default {
|
||||||
testPlanGet(this.planId)
|
testPlanGet(this.planId)
|
||||||
.then(response => {
|
.then(response => {
|
||||||
this.testPlan = response.data;
|
this.testPlan = response.data;
|
||||||
this.refreshTestPlanRecent();
|
testPlanFresh(this.planId);
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
batchEdit(form) {
|
batchEdit(form) {
|
||||||
|
|
Loading…
Reference in New Issue