diff --git a/backend/src/main/java/io/metersphere/base/domain/IssuesDao.java b/backend/src/main/java/io/metersphere/base/domain/IssuesDao.java index bbca3ab6e8..fe2587f8d7 100644 --- a/backend/src/main/java/io/metersphere/base/domain/IssuesDao.java +++ b/backend/src/main/java/io/metersphere/base/domain/IssuesDao.java @@ -10,4 +10,5 @@ public class IssuesDao extends IssuesWithBLOBs { private String projectName; private String creatorName; private String resourceName; + private long caseCount; } diff --git a/backend/src/main/java/io/metersphere/track/service/IssuesService.java b/backend/src/main/java/io/metersphere/track/service/IssuesService.java index dd7777cc9b..8a04c6964d 100644 --- a/backend/src/main/java/io/metersphere/track/service/IssuesService.java +++ b/backend/src/main/java/io/metersphere/track/service/IssuesService.java @@ -341,6 +341,10 @@ public class IssuesService { if (planMap.get(item.getResourceId()) != null) { item.setResourceName(planMap.get(item.getResourceId())); } + TestCaseIssuesExample example = new TestCaseIssuesExample(); + example.createCriteria().andIssuesIdEqualTo(item.getId()); + long caseCount = testCaseIssuesMapper.countByExample(example); + item.setCaseCount(caseCount); }); return issues; } diff --git a/frontend/src/business/components/track/issue/IssueList.vue b/frontend/src/business/components/track/issue/IssueList.vue index 4f63f950a2..ea742c7f06 100644 --- a/frontend/src/business/components/track/issue/IssueList.vue +++ b/frontend/src/business/components/track/issue/IssueList.vue @@ -105,9 +105,20 @@ - + + + +