diff --git a/backend/services/bug-management/src/main/java/io/metersphere/bug/dto/request/BugPageRequest.java b/backend/services/bug-management/src/main/java/io/metersphere/bug/dto/request/BugPageRequest.java
index 0d28effccc..a2f282ce04 100644
--- a/backend/services/bug-management/src/main/java/io/metersphere/bug/dto/request/BugPageRequest.java
+++ b/backend/services/bug-management/src/main/java/io/metersphere/bug/dto/request/BugPageRequest.java
@@ -19,4 +19,10 @@ public class BugPageRequest extends BasePageRequest {
@Schema(description = "是否回收站")
private boolean useTrash;
+
+ @Schema(description = "是否我的待办, 默认查询全部")
+ private boolean myTodo = false;
+
+ @Schema(description = "我的待办用户ID, 组合使用: myTodo=true, myTodoUserId=xxx")
+ private String myTodoUserId;
}
diff --git a/backend/services/bug-management/src/main/java/io/metersphere/bug/mapper/ExtBugMapper.xml b/backend/services/bug-management/src/main/java/io/metersphere/bug/mapper/ExtBugMapper.xml
index 76068c04fb..80486092be 100644
--- a/backend/services/bug-management/src/main/java/io/metersphere/bug/mapper/ExtBugMapper.xml
+++ b/backend/services/bug-management/src/main/java/io/metersphere/bug/mapper/ExtBugMapper.xml
@@ -157,6 +157,14 @@
or b.tags like concat('%', #{request.keyword},'%')
)
+
+
+ and b.platform = 'Local' and b.status in (
+ select id from status_item si left join status_definition sd on si.id = sd.status_id
+ where scope_type = 'PROJECT' and scope_id = #{request.projectId}
+ and (sd.definition_id != 'END' || sd.definition_id is null)
+ ) and b.handle_user = #{request.myTodoUserId}
+
diff --git a/backend/services/case-management/src/main/java/io/metersphere/functional/mapper/ExtCaseReviewMapper.xml b/backend/services/case-management/src/main/java/io/metersphere/functional/mapper/ExtCaseReviewMapper.xml
index de1d21c46f..757901d694 100644
--- a/backend/services/case-management/src/main/java/io/metersphere/functional/mapper/ExtCaseReviewMapper.xml
+++ b/backend/services/case-management/src/main/java/io/metersphere/functional/mapper/ExtCaseReviewMapper.xml
@@ -123,6 +123,13 @@
select case_review_user.review_id from case_review_user where case_review_user.user_id = #{request.reviewByMe}
)
+
+
+ and case_review.status in ('PREPARED', 'UNDERWAY')
+ and case_review.id in (
+ select review_id from case_review_user where user_id = #{request.myTodoUserId}
+ )
+
diff --git a/backend/services/case-management/src/main/java/io/metersphere/functional/request/CaseReviewPageRequest.java b/backend/services/case-management/src/main/java/io/metersphere/functional/request/CaseReviewPageRequest.java
index 7a1a287604..2d55a06246 100644
--- a/backend/services/case-management/src/main/java/io/metersphere/functional/request/CaseReviewPageRequest.java
+++ b/backend/services/case-management/src/main/java/io/metersphere/functional/request/CaseReviewPageRequest.java
@@ -28,6 +28,10 @@ public class CaseReviewPageRequest extends BasePageRequest implements Serializab
@Schema(description = "我创建的")
private String createByMe;
+ @Schema(description = "是否我的待办, 默认查询全部")
+ private boolean myTodo = false;
+ @Schema(description = "我的待办用户ID, 组合使用: myTodo=true, myTodoUserId=xxx")
+ private String myTodoUserId;
}
diff --git a/backend/services/dashboard/src/main/java/io/metersphere/dashboard/controller/MyViewController.java b/backend/services/dashboard/src/main/java/io/metersphere/dashboard/controller/MyViewController.java
index a4e0490368..100aaafa29 100644
--- a/backend/services/dashboard/src/main/java/io/metersphere/dashboard/controller/MyViewController.java
+++ b/backend/services/dashboard/src/main/java/io/metersphere/dashboard/controller/MyViewController.java
@@ -7,6 +7,7 @@ import io.metersphere.api.dto.definition.ApiTestCaseDTO;
import io.metersphere.api.dto.definition.ApiTestCasePageRequest;
import io.metersphere.api.dto.scenario.ApiScenarioDTO;
import io.metersphere.api.dto.scenario.ApiScenarioPageRequest;
+import io.metersphere.api.service.ApiTestService;
import io.metersphere.api.service.definition.ApiTestCaseService;
import io.metersphere.api.service.scenario.ApiScenarioService;
import io.metersphere.bug.dto.request.BugPageRequest;
@@ -27,9 +28,11 @@ import io.metersphere.plan.dto.response.TestPlanStatisticsResponse;
import io.metersphere.plan.service.TestPlanManagementService;
import io.metersphere.plan.service.TestPlanStatisticsService;
import io.metersphere.sdk.util.BeanUtils;
+import io.metersphere.system.dto.ProtocolDTO;
import io.metersphere.system.security.CheckOwner;
import io.metersphere.system.utils.PageUtils;
import io.metersphere.system.utils.Pager;
+import io.metersphere.system.utils.SessionUtils;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.media.Schema;
@@ -65,6 +68,8 @@ public class MyViewController {
@Resource
private ApiScenarioService apiScenarioService;
@Resource
+ private ApiTestService apiTestService;
+ @Resource
private BugService bugService;
@PostMapping("/plan/page")
@@ -103,6 +108,10 @@ public class MyViewController {
@Operation(summary = "我的-接口用例-列表分页查询")
@CheckOwner(resourceId = "#viewRequest.getProjectId()", resourceType = "project")
public Pager> page(@Validated @RequestBody DashboardViewApiCaseTableRequest viewRequest) {
+ // 默认查询当前用户组织下的所有协议
+ List protocols = apiTestService.getProtocols(SessionUtils.getCurrentOrganizationId());
+ List protocolList = protocols.stream().map(ProtocolDTO::getProtocol).toList();
+ viewRequest.setProtocols(protocolList);
Page