mirror of
https://gitee.com/fit2cloud-feizhiyun/MeterSphere.git
synced 2024-12-05 05:29:29 +08:00
fix(测试跟踪): 修复测试计划失败top10 的用例是跨项目的,该用例跳转链接页面是当前项目问题
--bug=1025817 --user=郭雨琦 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001025817
This commit is contained in:
parent
4b74b970b1
commit
d2f3d9e6c8
@ -669,31 +669,27 @@
|
||||
</update>
|
||||
<select id="findFailureCaseInTestPlanByProjectIDAndExecuteTimeAndLimitNumber"
|
||||
resultType="io.metersphere.dto.ExecutedCaseInfoResult">
|
||||
SELECT * FROM (
|
||||
SELECT
|
||||
testCase.id AS testCaseID,
|
||||
testCase.id AS id,
|
||||
testCase.`name` AS caseName,
|
||||
testCasePlan.testPlanName AS testPlan,
|
||||
testCasePlan.testPlanId AS testPlanId,
|
||||
count( executionInfo.id ) AS failureTimes,
|
||||
'testCase' AS caseType
|
||||
FROM
|
||||
function_case_execution_info executionInfo
|
||||
INNER JOIN (
|
||||
SELECT
|
||||
testPlanTestCase.id,
|
||||
testPlanTestCase.case_id,
|
||||
testPlan.id AS testPlanId,
|
||||
testPlan.`name` AS testPlanName
|
||||
FROM
|
||||
test_plan_test_case testPlanTestCase
|
||||
INNER JOIN test_plan testPlan ON testPlan.id = testPlanTestCase.plan_id
|
||||
WHERE testPlan.project_id = #{projectId}
|
||||
) testCasePlan ON testCasePlan.id = executionInfo.source_id
|
||||
INNER JOIN test_case testCase ON testCase.id = testCasePlan.case_id
|
||||
WHERE
|
||||
testCase.`status` != 'Trash'
|
||||
SELECT *
|
||||
FROM (SELECT testCase.id AS testCaseID,
|
||||
testCase.id AS id,
|
||||
testCase.`name` AS caseName,
|
||||
testCasePlan.testPlanName AS testPlan,
|
||||
testCasePlan.testPlanId AS testPlanId,
|
||||
count(executionInfo.id) AS failureTimes,
|
||||
'testCase' AS caseType,
|
||||
testCase.project_id AS projectId
|
||||
FROM function_case_execution_info executionInfo
|
||||
INNER JOIN (SELECT testPlanTestCase.id,
|
||||
testPlanTestCase.case_id,
|
||||
testPlan.id AS testPlanId,
|
||||
testPlan.`name` AS testPlanName,
|
||||
testPlan.project_id
|
||||
FROM test_plan_test_case testPlanTestCase
|
||||
INNER JOIN test_plan testPlan ON testPlan.id = testPlanTestCase.plan_id
|
||||
WHERE testPlan.project_id = #{projectId}) testCasePlan
|
||||
ON testCasePlan.id = executionInfo.source_id
|
||||
INNER JOIN test_case testCase ON testCase.id = testCasePlan.case_id
|
||||
WHERE testCase.`status` != 'Trash'
|
||||
AND ( executionInfo.result = 'Failure' )
|
||||
AND executionInfo.create_time >= #{startTimestamp}
|
||||
GROUP BY testCase.id
|
||||
|
@ -231,7 +231,7 @@ export default {
|
||||
};
|
||||
},
|
||||
created() {
|
||||
let projectId = this.$route.query.projectId;
|
||||
let projectId = this.$route.params.projectId;
|
||||
if (projectId) {
|
||||
this.ignoreTreeNodes = true;
|
||||
if (projectId !== getCurrentProjectID() && projectId !== 'all') {
|
||||
|
@ -91,6 +91,7 @@ export default {
|
||||
redirectID: uuid,
|
||||
dataType: dataType,
|
||||
dataSelectRange: selectType,
|
||||
projectId: projectId,
|
||||
},
|
||||
});
|
||||
break;
|
||||
|
@ -209,7 +209,7 @@ export default {
|
||||
);
|
||||
break;
|
||||
case "testCase":
|
||||
this.$emit("redirectPage", "testCase", "case", "single:" + param);
|
||||
this.$emit("redirectPage", "testCase", "case", "single:" + param, projectId);
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user